From 78f119364179d099cd827fb6818b429444f22a69 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 5 Mar 2023 18:27:48 +0000 Subject: [PATCH] Update types --- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../13AddTrader/types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../7OnLoadHook/types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- .../types/callbacks/GameCallbacks.d.ts | 1 + .../types/callbacks/ProfileCallbacks.d.ts | 2 + .../types/context/ApplicationContext.d.ts | 2 + .../types/controllers/GameController.d.ts | 9 +++- .../types/controllers/InraidController.d.ts | 14 +++---- .../controllers/InventoryController.d.ts | 42 +++++++++++++++++-- .../types/controllers/TradeController.d.ts | 5 ++- .../types/generators/BotLootGenerator.d.ts | 15 +------ .../types/generators/BotWeaponGenerator.d.ts | 21 +++++----- .../types/generators/LocationGenerator.d.ts | 33 ++++++++++++++- .../helpers/BotWeaponGeneratorHelper.d.ts | 6 +-- .../types/helpers/HideoutHelper.d.ts | 15 ++++++- .../types/helpers/InRaidHelper.d.ts | 29 ++++++++++--- .../types/helpers/InventoryHelper.d.ts | 12 ++++-- .../types/helpers/ItemHelper.d.ts | 42 ++++++++++++++----- .../types/helpers/ProfileHelper.d.ts | 7 +++- .../types/helpers/QuestHelper.d.ts | 2 +- .../types/loaders/PostAkiModLoader.d.ts | 6 ++- .../types/loaders/PostDBModLoader.d.ts | 6 ++- .../types/models/eft/common/IGlobals.d.ts | 6 +++ .../types/models/eft/common/ILooseLoot.d.ts | 5 ++- .../models/eft/common/tables/IBotBase.d.ts | 4 +- .../eft/match/IEndOfflineRaidRequestData.d.ts | 2 +- .../IGetRaidConfigurationRequestData.d.ts | 4 +- .../IPresetBuildActionRequestData.d.ts | 12 +----- .../profile/IGetProfileSettingsRequest.d.ts | 3 ++ .../types/models/enums/ConfigTypes.d.ts | 3 +- .../types/models/spt/config/IHttpConfig.d.ts | 1 + .../models/spt/config/ILocationConfig.d.ts | 21 ++++++++-- .../models/spt/config/ILostOnDeathConfig.d.ts | 21 ++++++++++ .../models/spt/config/ITraderConfig.d.ts | 1 + .../types/models/spt/mod/NewItemDetails.d.ts | 2 + .../types/services/InsuranceService.d.ts | 10 ++++- 594 files changed, 4968 insertions(+), 1584 deletions(-) create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/spt/config/ILostOnDeathConfig.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/profile/IGetProfileSettingsRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/spt/config/ILostOnDeathConfig.d.ts diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/10ScopesAndTypes/types/context/ApplicationContext.d.ts b/TypeScript/10ScopesAndTypes/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/10ScopesAndTypes/types/context/ApplicationContext.d.ts +++ b/TypeScript/10ScopesAndTypes/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/10ScopesAndTypes/types/loaders/PostAkiModLoader.d.ts b/TypeScript/10ScopesAndTypes/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/10ScopesAndTypes/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/10ScopesAndTypes/types/loaders/PostDBModLoader.d.ts b/TypeScript/10ScopesAndTypes/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/10ScopesAndTypes/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/11BundleLoadingSample/types/context/ApplicationContext.d.ts b/TypeScript/11BundleLoadingSample/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/11BundleLoadingSample/types/context/ApplicationContext.d.ts +++ b/TypeScript/11BundleLoadingSample/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/11BundleLoadingSample/types/loaders/PostAkiModLoader.d.ts b/TypeScript/11BundleLoadingSample/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/11BundleLoadingSample/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/11BundleLoadingSample/types/loaders/PostDBModLoader.d.ts b/TypeScript/11BundleLoadingSample/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/11BundleLoadingSample/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/12ClassExtensionOverride/types/context/ApplicationContext.d.ts b/TypeScript/12ClassExtensionOverride/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/12ClassExtensionOverride/types/context/ApplicationContext.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/12ClassExtensionOverride/types/loaders/PostAkiModLoader.d.ts b/TypeScript/12ClassExtensionOverride/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/12ClassExtensionOverride/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/12ClassExtensionOverride/types/loaders/PostDBModLoader.d.ts b/TypeScript/12ClassExtensionOverride/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/12ClassExtensionOverride/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/13AddTrader/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/13AddTrader/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/13AddTrader/types/context/ApplicationContext.d.ts b/TypeScript/13AddTrader/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/13AddTrader/types/context/ApplicationContext.d.ts +++ b/TypeScript/13AddTrader/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/13AddTrader/types/controllers/GameController.d.ts b/TypeScript/13AddTrader/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/13AddTrader/types/controllers/GameController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts b/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/13AddTrader/types/controllers/TradeController.d.ts b/TypeScript/13AddTrader/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/13AddTrader/types/controllers/TradeController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/13AddTrader/types/generators/LocationGenerator.d.ts b/TypeScript/13AddTrader/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/13AddTrader/types/generators/LocationGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/13AddTrader/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/13AddTrader/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/13AddTrader/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts b/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/13AddTrader/types/loaders/PostAkiModLoader.d.ts b/TypeScript/13AddTrader/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/13AddTrader/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/13AddTrader/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/13AddTrader/types/loaders/PostDBModLoader.d.ts b/TypeScript/13AddTrader/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/13AddTrader/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/13AddTrader/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts b/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/13AddTrader/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/13AddTrader/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/13AddTrader/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/13AddTrader/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/13AddTrader/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/13AddTrader/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/13AddTrader/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/13AddTrader/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/13AddTrader/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts b/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/13AddTrader/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/13AddTrader/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/13AddTrader/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/13AddTrader/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/13AddTrader/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts +++ b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/14AfterDBLoadHook/types/context/ApplicationContext.d.ts b/TypeScript/14AfterDBLoadHook/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/14AfterDBLoadHook/types/context/ApplicationContext.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/14AfterDBLoadHook/types/loaders/PostAkiModLoader.d.ts b/TypeScript/14AfterDBLoadHook/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/14AfterDBLoadHook/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/14AfterDBLoadHook/types/loaders/PostDBModLoader.d.ts b/TypeScript/14AfterDBLoadHook/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/14AfterDBLoadHook/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/15HttpListenerExample/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/15HttpListenerExample/types/context/ApplicationContext.d.ts b/TypeScript/15HttpListenerExample/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/15HttpListenerExample/types/context/ApplicationContext.d.ts +++ b/TypeScript/15HttpListenerExample/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/15HttpListenerExample/types/loaders/PostAkiModLoader.d.ts b/TypeScript/15HttpListenerExample/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/15HttpListenerExample/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/15HttpListenerExample/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/15HttpListenerExample/types/loaders/PostDBModLoader.d.ts b/TypeScript/15HttpListenerExample/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/15HttpListenerExample/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/15HttpListenerExample/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/16ImporterUtil/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/16ImporterUtil/types/context/ApplicationContext.d.ts b/TypeScript/16ImporterUtil/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/16ImporterUtil/types/context/ApplicationContext.d.ts +++ b/TypeScript/16ImporterUtil/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts b/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/16ImporterUtil/types/generators/LocationGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/16ImporterUtil/types/generators/LocationGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/16ImporterUtil/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/16ImporterUtil/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/16ImporterUtil/types/loaders/PostAkiModLoader.d.ts b/TypeScript/16ImporterUtil/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/16ImporterUtil/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/16ImporterUtil/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/16ImporterUtil/types/loaders/PostDBModLoader.d.ts b/TypeScript/16ImporterUtil/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/16ImporterUtil/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/16ImporterUtil/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts b/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/16ImporterUtil/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/context/ApplicationContext.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/context/ApplicationContext.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/17AsyncImporterWithDependency1/types/loaders/PostAkiModLoader.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/loaders/PostDBModLoader.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/context/ApplicationContext.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/context/ApplicationContext.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/17AsyncImporterWithDependency2/types/loaders/PostAkiModLoader.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/loaders/PostDBModLoader.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/1LogToConsole/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/1LogToConsole/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/1LogToConsole/types/context/ApplicationContext.d.ts b/TypeScript/1LogToConsole/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/1LogToConsole/types/context/ApplicationContext.d.ts +++ b/TypeScript/1LogToConsole/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts b/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/1LogToConsole/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/1LogToConsole/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/1LogToConsole/types/loaders/PostAkiModLoader.d.ts b/TypeScript/1LogToConsole/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/1LogToConsole/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/1LogToConsole/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/1LogToConsole/types/loaders/PostDBModLoader.d.ts b/TypeScript/1LogToConsole/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/1LogToConsole/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/1LogToConsole/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/1LogToConsole/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/1LogToConsole/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/1LogToConsole/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/1LogToConsole/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/1LogToConsole/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/1LogToConsole/types/models/enums/ConfigTypes.d.ts b/TypeScript/1LogToConsole/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/1LogToConsole/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/1LogToConsole/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/1LogToConsole/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/1LogToConsole/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/2EditDatabase/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/2EditDatabase/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/2EditDatabase/types/context/ApplicationContext.d.ts b/TypeScript/2EditDatabase/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/2EditDatabase/types/context/ApplicationContext.d.ts +++ b/TypeScript/2EditDatabase/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts b/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts b/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/2EditDatabase/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/2EditDatabase/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/2EditDatabase/types/loaders/PostAkiModLoader.d.ts b/TypeScript/2EditDatabase/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/2EditDatabase/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/2EditDatabase/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/2EditDatabase/types/loaders/PostDBModLoader.d.ts b/TypeScript/2EditDatabase/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/2EditDatabase/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/2EditDatabase/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/2EditDatabase/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/2EditDatabase/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/2EditDatabase/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/2EditDatabase/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/2EditDatabase/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/2EditDatabase/types/models/enums/ConfigTypes.d.ts b/TypeScript/2EditDatabase/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/2EditDatabase/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/2EditDatabase/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/2EditDatabase/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/2EditDatabase/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/3GetSptConfigFile/types/context/ApplicationContext.d.ts b/TypeScript/3GetSptConfigFile/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/3GetSptConfigFile/types/context/ApplicationContext.d.ts +++ b/TypeScript/3GetSptConfigFile/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/3GetSptConfigFile/types/controllers/TradeController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/TradeController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/3GetSptConfigFile/types/generators/LocationGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/LocationGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/3GetSptConfigFile/types/loaders/PostAkiModLoader.d.ts b/TypeScript/3GetSptConfigFile/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/3GetSptConfigFile/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/3GetSptConfigFile/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/3GetSptConfigFile/types/loaders/PostDBModLoader.d.ts b/TypeScript/3GetSptConfigFile/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/3GetSptConfigFile/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/3GetSptConfigFile/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/ConfigTypes.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/4UseACustomConfigFile/types/context/ApplicationContext.d.ts b/TypeScript/4UseACustomConfigFile/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/4UseACustomConfigFile/types/context/ApplicationContext.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/4UseACustomConfigFile/types/loaders/PostAkiModLoader.d.ts b/TypeScript/4UseACustomConfigFile/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/4UseACustomConfigFile/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/4UseACustomConfigFile/types/loaders/PostDBModLoader.d.ts b/TypeScript/4UseACustomConfigFile/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/4UseACustomConfigFile/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/5ReplaceMethod/types/context/ApplicationContext.d.ts b/TypeScript/5ReplaceMethod/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/5ReplaceMethod/types/context/ApplicationContext.d.ts +++ b/TypeScript/5ReplaceMethod/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/5ReplaceMethod/types/loaders/PostAkiModLoader.d.ts b/TypeScript/5ReplaceMethod/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/5ReplaceMethod/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/5ReplaceMethod/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/5ReplaceMethod/types/loaders/PostDBModLoader.d.ts b/TypeScript/5ReplaceMethod/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/5ReplaceMethod/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/5ReplaceMethod/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/context/ApplicationContext.d.ts b/TypeScript/6ReferenceAnotherClass/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/context/ApplicationContext.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/6ReferenceAnotherClass/types/loaders/PostAkiModLoader.d.ts b/TypeScript/6ReferenceAnotherClass/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/6ReferenceAnotherClass/types/loaders/PostDBModLoader.d.ts b/TypeScript/6ReferenceAnotherClass/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/7OnLoadHook/types/context/ApplicationContext.d.ts b/TypeScript/7OnLoadHook/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/7OnLoadHook/types/context/ApplicationContext.d.ts +++ b/TypeScript/7OnLoadHook/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts b/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/7OnLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/7OnLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/7OnLoadHook/types/loaders/PostAkiModLoader.d.ts b/TypeScript/7OnLoadHook/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/7OnLoadHook/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/7OnLoadHook/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/7OnLoadHook/types/loaders/PostDBModLoader.d.ts b/TypeScript/7OnLoadHook/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/7OnLoadHook/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/7OnLoadHook/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts b/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/7OnLoadHook/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/8OnUpdateHook/types/context/ApplicationContext.d.ts b/TypeScript/8OnUpdateHook/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/8OnUpdateHook/types/context/ApplicationContext.d.ts +++ b/TypeScript/8OnUpdateHook/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/8OnUpdateHook/types/loaders/PostAkiModLoader.d.ts b/TypeScript/8OnUpdateHook/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/8OnUpdateHook/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/8OnUpdateHook/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/8OnUpdateHook/types/loaders/PostDBModLoader.d.ts b/TypeScript/8OnUpdateHook/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/8OnUpdateHook/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/8OnUpdateHook/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile diff --git a/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts index 3a6b7e6..30cf074 100644 --- a/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts @@ -39,6 +39,7 @@ declare class GameCallbacks { */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts index 183bb0a..9a5848e 100644 --- a/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts @@ -5,6 +5,7 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData"; +import { IGetProfileSettingsRequest } from "../models/eft/profile/IGetProfileSettingsRequest"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; @@ -64,6 +65,7 @@ export declare class ProfileCallbacks { * @returns */ getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/9RouterHooks/types/context/ApplicationContext.d.ts b/TypeScript/9RouterHooks/types/context/ApplicationContext.d.ts index 28bbdf7..0a81be0 100644 --- a/TypeScript/9RouterHooks/types/context/ApplicationContext.d.ts +++ b/TypeScript/9RouterHooks/types/context/ApplicationContext.d.ts @@ -8,6 +8,8 @@ export declare class ApplicationContext { * * const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue(); * + * const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue(); + * * const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue(); * @param type * @returns diff --git a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts index 44264dc..e47d5fa 100644 --- a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts @@ -20,10 +20,12 @@ import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; +import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected preAkiModLoader: PreAkiModLoader; protected httpServerHelper: HttpServerHelper; @@ -39,7 +41,7 @@ export declare class GameController { protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; /** * When player logs in, iterate over all active effects and reduce timer @@ -55,6 +57,10 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long + */ + protected splitBotWavesIntoSingleWaves(): void; /** * Get a list of installed mods and save their details to the profile being used * @param fullProfile Profile to add mod details to @@ -76,5 +82,6 @@ export declare class GameController { protected logProfileDetails(fullProfile: IAkiProfile): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): IServerDetails[]; + getCurrentGroup(sessionId: any): any; getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts index f954eff..4b0c21b 100644 --- a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts @@ -61,18 +61,18 @@ export declare class InraidController { */ protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; /** - * Make changes to pmc profile after they left raid dead, - * alter bodypart hp, handle insurance, delete inventory items, remove carried quest items - * @param postRaidSaveRequest post-raid save request - * @param pmcData pmc profile - * @param insuranceEnabled is insurance enabled - * @param preRaidGear gear player had before raid + * Make changes to pmc profile after they've died in raid, + * Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items + * @param postRaidSaveRequest Post-raid save request + * @param pmcData Pmc profile + * @param insuranceEnabled Is insurance enabled + * @param preRaidGear Gear player had before raid * @param sessionID Session id * @returns Updated profile object */ protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData; /** - * Adjust player characters bodypart hp if they left raid early + * Adjust player characters bodypart hp post-raid * @param postRaidSaveRequest post raid data * @param pmcData player profile */ diff --git a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts index 129ede3..53bb017 100644 --- a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts @@ -112,7 +112,14 @@ export declare class InventoryController { * @returns client response object */ tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Bind an inventory item to the quick access menu at bottom of player screen + * @param pmcData Player profile + * @param bindRequest Reqeust object + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; /** * Handles examining an item * @param pmcData player profile @@ -137,9 +144,36 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; - createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; - deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; - editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Add note to a map + * @param pmcData Player profile + * @param request Add marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Delete a map marker + * @param pmcData Player profile + * @param request Delete marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Edit an existing map marker + * @param pmcData Player profile + * @param request Edit marker request + * @param sessionID Session id + * @returns IItemEventRouterResponse + */ + editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Strip out characters from note string that are not: letter/numbers/unicode/spaces + * @param mapNoteText Marker text to sanitise + * @returns Sanitised map marker text + */ + protected sanitiseMapMarkerText(mapNoteText: string): string; /** * Handle event fired when a container is unpacked (currently only the halloween pumpkin) * @param pmcData Profile data diff --git a/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts b/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts index dc7de19..8a0630b 100644 --- a/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts @@ -7,6 +7,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { ConfigServer } from "../servers/ConfigServer"; @@ -24,8 +25,10 @@ declare class TradeController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer); - confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; + confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; + protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; } export { TradeController }; diff --git a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts index a4ce4e0..044d407 100644 --- a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts @@ -5,7 +5,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase"; import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -96,19 +96,6 @@ export declare class BotLootGenerator { * @returns true if item has reached spawn limit */ protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record, itemSpawnLimits: Record): boolean; - /** - * Is the item an ammo box - * @param props props of the item to check - * @returns true if item is an ammo box - */ - protected isAmmoBox(props: Props): boolean; - /** - * Create an object that contains the ammo stack for an ammo box - * @param parentId ammo box id - * @param props ammo box props - * @returns Item object - */ - protected createAmmoForAmmoBox(parentId: string, props: Props): Item; /** * Randomise the stack size of a money object, uses different values for pmc or scavs * @param isPmc is this a PMC diff --git a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts index a68b82f..3e9fe30 100644 --- a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts @@ -140,26 +140,27 @@ export declare class BotWeaponGenerator { protected getWeaponCaliber(weaponTemplate: ITemplateItem): string; /** * Fill existing magazines to full, while replacing their contents with specified ammo - * @param weaponMods - * @param magazine - * @param ammoTpl + * @param weaponMods Weapon with children + * @param magazine Magazine item + * @param cartridgeTpl Cartridge to insert into magazine */ - protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, cartridgeTpl: string): void; /** * Add desired ammo tpl as item to weaponmods array, placed as child to UBGL - * @param weaponMods - * @param ubglMod - * @param ubglAmmoTpl + * @param weaponMods Weapon with children + * @param ubglMod UBGL item + * @param ubglAmmoTpl Grenade ammo tpl */ protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void; /** * Add cartridge item to weapon Item array, if it already exists, update - * @param weaponMods Weapon items array to amend + * @param weaponWithMods Weapon items array to amend * @param magazine magazine item details we're adding cartridges to - * @param chosenAmmo cartridge to put into the magazine + * @param chosenAmmoTpl cartridge to put into the magazine * @param newStackSize how many cartridges should go into the magazine + * @param magazineTemplate magazines db template */ - protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void; + protected addOrUpdateMagazinesChildWithAmmo(weaponWithMods: Item[], magazine: Item, chosenAmmoTpl: string, magazineTemplate: ITemplateItem): void; /** * Fill each Camora with a bullet * @param weaponMods Weapon mods to find and update camora mod(s) from diff --git a/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts index a617048..04b1599 100644 --- a/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -34,6 +34,15 @@ export declare class LocationGenerator { protected configServer: ConfigServer; protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * Choose loot to put into a static container + * @param containerIn + * @param staticForced + * @param staticLootDist + * @param staticAmmoDist + * @param locationName Name of the map to generate static loot for + * @returns IStaticContainerProps + */ generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; @@ -52,5 +61,25 @@ export declare class LocationGenerator { * @param name of map currently generating forced loot for */ protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void; - protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + /** + * Create array of item (with child items) and return + * @param chosenComposedKey Key we want to look up items for + * @param spawnPoint Dynamic spawn point item we want will be placed in + * @returns IContainerItem + */ + protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem; + /** + * Replace the _id value for base item + all children items parentid value + * @param itemWithChildren Item with mods to update + * @param newId new id to add on chidren of base item + */ + protected reparentItemAndChildren(itemWithChildren: Item[], newId?: string): void; + /** + * Find an item in array by its _tpl, handle differently if chosenTpl is a weapon + * @param items Items array to search + * @param chosenTpl Tpl we want to get item with + * @returns Item object + */ + protected getItemInArray(items: Item[], chosenTpl: string): Item; + protected createStaticLootItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; } diff --git a/TypeScript/9RouterHooks/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/BotWeaponGeneratorHelper.d.ts index cefc3bd..8a3784b 100644 --- a/TypeScript/9RouterHooks/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -65,11 +65,11 @@ export declare class BotWeaponGeneratorHelper { /** * TODO - move into BotGeneratorHelper, this is not the class for it * Adds an item with all its children into specified equipmentSlots, wherever it fits. - * @param equipmentSlots + * @param equipmentSlots Slot to add item+children into * @param parentId * @param parentTpl - * @param itemWithChildren - * @param inventory + * @param itemWithChildren Item to add + * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; diff --git a/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts index a5849e3..466b41d 100644 --- a/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts @@ -140,8 +140,21 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; + /** + * Get a count of bitcoins player miner can hold + */ protected getManagementSkillsSlots(): number; - protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + /** + * Does profile have elite hideout management skill + * @param pmcData Profile to look at + * @returns True if profile has skill + */ + protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get the hideout management skill from player profile + * @param pmcData Profile to look at + * @returns Hideout management skill object + */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; /** diff --git a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts index c69a810..b65d78d 100644 --- a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts @@ -2,24 +2,35 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocalisationService } from "../services/LocalisationService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; +import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; protected jsonUtil: JsonUtil; + protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService); + protected configServer: ConfigServer; + protected lostOnDeathConfig: ILostOnDeathConfig; + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + /** + * Should quest items be removed from player inventory on death + * @returns True if items should be removed from inventory + */ + removeQuestItemsOnDeath(): boolean; /** * Check an array of items and add an upd object to money items with a stack count of 1 * Single stack money items have no upd object and thus no StackObjectsCount, causing issues @@ -83,7 +94,7 @@ export declare class InRaidHelper { * Remove equipped items from pre-raid * Add new items found in raid to profile * Store insurance items in profile - * @param sessionID + * @param sessionID Session id * @param pmcData Profile to update * @param postRaidProfile Profile returned by client after a raid * @returns Updated profile @@ -94,15 +105,21 @@ export declare class InRaidHelper { * Used post-raid to remove items after death * @param pmcData Player profile * @param sessionID Session id - * @returns Player profile with pmc inventory cleared */ - deleteInventory(pmcData: IPmcData, sessionID: string): IPmcData; + deleteInventory(pmcData: IPmcData, sessionID: string): void; + /** + * Get items in vest/pocket/backpack inventory containers (excluding children) + * @param pmcData Player profile + * @returns Item array + */ + protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[]; /** * Does the provided items slotId mean its kept on the player after death - * @param slotId slotid of item to check + * @pmcData Player profile + * @itemToCheck Item to check should be kept * @returns true if item is kept after death */ - isItemKeptAfterDeath(slotId: string): boolean; + protected isItemKeptAfterDeath(pmcData: IPmcData, itemToCheck: Item): boolean; /** * Return the equipped items from a players inventory * @param items Players inventory to search through diff --git a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts index 8855d1e..9c31d78 100644 --- a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts @@ -61,12 +61,12 @@ export declare class InventoryHelper { /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box - * @param toDo + * @param parentId Ammo box parent id * @param output IItemEventRouterResponse object * @param sessionID Session id * @param pmcData Profile to add ammobox to */ - protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void; + protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void; /** * * @param assortItems Items to add to inventory @@ -111,7 +111,13 @@ export declare class InventoryHelper { /** * Internal helper function to move item within the same profile_f. */ - moveItemInternal(inventoryItems: Item[], body: IInventoryMoveRequestData): void; + moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void; + /** + * Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access + * @param pmcData Player profile + * @param itemBeingMoved item being moved + */ + protected updateFastPanelBinding(pmcData: IPmcData, itemBeingMoved: Item): void; /** * Internal helper function to handle cartridges in inventory if any of them exist. */ diff --git a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts index de424d2..bd4893c 100644 --- a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts @@ -193,31 +193,53 @@ declare class ItemHelper { replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do - * @param {string} tpl - * @param {Array} tplsToCheck - * @returns boolean + * @param {string} tpl Items tpl to check parents of + * @param {Array} tplsToCheck Tpl values to check if parents of item match + * @returns boolean Match found */ doesItemOrParentsIdMatch(tpl: string, tplsToCheck: string[]): boolean; /** - * Return true if item is a quest item - * @param {string} tpl - * @returns boolean + * Check if item is quest item + * @param tpl Items tpl to check quest status of + * @returns true if item is flagged as quest item */ isQuestItem(tpl: string): boolean; /** * Get the inventory size of an item - * @param items + * @param items Item with children * @param rootItemId * @returns ItemSize object (width and height) */ getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize; /** * Get a random cartridge from an items Filter property - * @param item - * @returns + * @param item Db item template to look up Cartridge filter values from + * @returns Caliber of cartridge */ getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; - createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + /** + * Add cartridges to the ammo box with correct max stack sizes + * @param ammoBox Box to add cartridges to + * @param ammoBoxDetails Item template from items db + */ + addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void; + /** + * Add child items (cartridges) to a magazine + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param staticAmmoDist Cartridge distribution + * @param caliber Caliber of cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number): void; + /** + * Add child items to a magazine of a specific cartridge + * @param magazine Magazine to add child items to + * @param magTemplate Db template of magazine + * @param cartridgeTpl Cartridge to add to magazine + * @param minSizePercent % the magazine must be filled to + */ + fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void; protected getRandomValidCaliber(magTemplate: ITemplateItem): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; /** diff --git a/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts index 79652ad..28d3d23 100644 --- a/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts @@ -20,7 +20,12 @@ export declare class ProfileHelper { protected itemHelper: ItemHelper; protected profileSnapshotService: ProfileSnapshotService; constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService); - resetProfileQuestCondition(sessionID: string, conditionId: string): void; + /** + * Remove/reset started quest condtions in player profile + * @param sessionID Session id + * @param conditionIds Condition ids that need to be reset/removed + */ + resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void; /** * Get all profiles from server * @returns Dictionary of profiles diff --git a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts index 20973f4..1ec9fe8 100644 --- a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts @@ -211,7 +211,7 @@ export declare class QuestHelper { * @param itemTpl item tpl to look for * @returns 'FindItem' condition id */ - getFindItemIdForQuestHandIn(itemTpl: string): string; + getFindItemIdForQuestHandIn(itemTpl: string): string[]; /** * Add all quests to a profile with the provided statuses * @param pmcProfile profile to update diff --git a/TypeScript/9RouterHooks/types/loaders/PostAkiModLoader.d.ts b/TypeScript/9RouterHooks/types/loaders/PostAkiModLoader.d.ts index 5df8c6c..848e9f3 100644 --- a/TypeScript/9RouterHooks/types/loaders/PostAkiModLoader.d.ts +++ b/TypeScript/9RouterHooks/types/loaders/PostAkiModLoader.d.ts @@ -1,15 +1,19 @@ import { DependencyContainer } from "tsyringe"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostAkiModLoader implements IModLoader { + protected logger: ILogger; protected bundleLoader: BundleLoader; protected vfs: VFS; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); getModPath(mod: string): string; load(): Promise; protected executeMods(container: DependencyContainer): Promise; diff --git a/TypeScript/9RouterHooks/types/loaders/PostDBModLoader.d.ts b/TypeScript/9RouterHooks/types/loaders/PostDBModLoader.d.ts index c4cda5c..eef160b 100644 --- a/TypeScript/9RouterHooks/types/loaders/PostDBModLoader.d.ts +++ b/TypeScript/9RouterHooks/types/loaders/PostDBModLoader.d.ts @@ -1,11 +1,15 @@ import { DependencyContainer } from "tsyringe"; import { OnLoad } from "../di/OnLoad"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "../services/LocalisationService"; import { ModTypeCheck } from "./ModTypeCheck"; import { PreAkiModLoader } from "./PreAkiModLoader"; export declare class PostDBModLoader implements OnLoad { + protected logger: ILogger; protected preAkiModLoader: PreAkiModLoader; + protected localisationService: LocalisationService; protected modTypeCheck: ModTypeCheck; - constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck); + constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck); onLoad(): Promise; getRoute(): string; getModPath(mod: string): string; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts index b5ed401..5790cde 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts @@ -70,6 +70,7 @@ export interface Config { EventType: string[]; WalkSpeed: xyz; SprintSpeed: xyz; + SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; Insurance: Insurance; @@ -803,6 +804,11 @@ export interface RestrictionsInRaid { TemplateId: string; Value: number; } +export interface ISquadSettings { + CountOfRequestsToOnePlayer: number; + SecondsForExpiredRequest: number; + SendRequestDelaySeconds: number; +} export interface Insurance { MaxStorageTimeInHour: number; } diff --git a/TypeScript/9RouterHooks/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/ILooseLoot.d.ts index 1350a2f..572ec69 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/ILooseLoot.d.ts @@ -37,6 +37,9 @@ export interface Xyz { z: number; } export interface ItemDistribution { - tpl: string; + composedKey: ComposedKey; relativeProbability: number; } +export interface ComposedKey { + key: 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 dd7c478..82a925b 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts @@ -120,9 +120,7 @@ export interface Inventory { sortingTable: string; questRaidItems: string; questStashItems: string; - fastPanel: FastPanel; -} -export interface FastPanel { + fastPanel: Record; } export interface Skills { Common: Common[]; diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IEndOfflineRaidRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IEndOfflineRaidRequestData.d.ts index 811e9a2..9368c32 100644 --- a/TypeScript/9RouterHooks/types/models/eft/match/IEndOfflineRaidRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/match/IEndOfflineRaidRequestData.d.ts @@ -1,6 +1,6 @@ export interface IEndOfflineRaidRequestData { crc: number; exitStatus: string; - exitName: any; + exitName: string; raidSeconds: number; } diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index cbcc2f6..ed3dfab 100644 --- a/TypeScript/9RouterHooks/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,4 +1,7 @@ export interface IGetRaidConfigurationRequestData { + keyId: string; + side: string; + location: string; timeVariant: string; raidMode: string; metabolismDisabled: boolean; @@ -6,7 +9,6 @@ export interface IGetRaidConfigurationRequestData { timeAndWeatherSettings: TimeAndWeatherSettings; botSettings: BotSettings; wavesSettings: WavesSettings; - location: string; } export interface TimeAndWeatherSettings { isRandomTime: boolean; diff --git a/TypeScript/9RouterHooks/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts index 99c61f1..42549e6 100644 --- a/TypeScript/9RouterHooks/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/presetBuild/IPresetBuildActionRequestData.d.ts @@ -1,3 +1,4 @@ +import { Upd } from "../common/tables/IItem"; export interface IPresetBuildActionRequestData { Action: string; id: string; @@ -12,14 +13,3 @@ export interface Item { parentId?: string; slotId?: string; } -export interface Upd { - Repairable: Repairable; - FireMode: FireMode; -} -export interface Repairable { - MaxDurability: number; - Durability: number; -} -export interface FireMode { - FireMode: string; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/profile/IGetProfileSettingsRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/profile/IGetProfileSettingsRequest.d.ts new file mode 100644 index 0000000..8168615 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/profile/IGetProfileSettingsRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetProfileSettingsRequest { + squadInviteRestriction: boolean; +} diff --git a/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts b/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts index 9c48b68..d849010 100644 --- a/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts @@ -19,5 +19,6 @@ export declare enum ConfigTypes { SCAVCASE = "aki-scavcase", TRADER = "aki-trader", WEATHER = "aki-weather", - SEASONAL_EVENT = "aki-seasonalevents" + SEASONAL_EVENT = "aki-seasonalevents", + LOST_ON_DEATH = "aki-lostondeath" } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IHttpConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IHttpConfig.d.ts index 3fe4787..c34c11d 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IHttpConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IHttpConfig.d.ts @@ -4,4 +4,5 @@ export interface IHttpConfig extends IBaseConfig { kind: "aki-http"; ip: string; port: number; + logRequests: boolean; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts index f808ad8..bcd91cc 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts @@ -2,9 +2,9 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas import { IBaseConfig } from "./IBaseConfig"; export interface ILocationConfig extends IBaseConfig { kind: "aki-location"; - fixEmptyBotWaves: boolean; - fixRoguesTakingAllSpawnsOnLighthouse: boolean; - lighthouseRogueSpawnTimeSeconds: number; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; looseLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier; customWaves: CustomWaves; @@ -12,6 +12,21 @@ export interface ILocationConfig extends IBaseConfig { openZones: Record; /** Key = map id, value = item tpls that should only have one forced loot spawn position */ forcedLootSingleSpawnById: Record; + /** How many attempts should be taken to fit an item into a container before giving up */ + fitLootIntoContainerAttempts: number; +} +export interface IFixEmptyBotWavesSettings { + enabled: boolean; + ignoreMaps: string[]; +} +export interface IRogueLighthouseSpawnTimeSettings { + enabled: boolean; + waitTimeSeconds: number; +} +export interface ISplitWaveSettings { + enabled: boolean; + ignoreMaps: string[]; + waveSizeThreshold: number; } export interface CustomWaves { boss: Record; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ILostOnDeathConfig.d.ts new file mode 100644 index 0000000..b557afe --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -0,0 +1,21 @@ +import { IBaseConfig } from "./IBaseConfig"; +export interface ILostOnDeathConfig extends IBaseConfig { + kind: "aki-lostondeath"; + equipment: Equipment; + specialSlotItems: boolean; + questItems: boolean; +} +export interface Equipment { + ArmBand: boolean; + Headwear: boolean; + Earpiece: boolean; + FaceCover: boolean; + ArmorVest: boolean; + Eyewear: boolean; + TacticalVest: boolean; + Backpack: boolean; + Holster: boolean; + FirstPrimaryWeapon: boolean; + SecondPrimaryWeapon: boolean; + Scabbard: boolean; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts index 9a7c6ea..832f22a 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts @@ -3,6 +3,7 @@ import { IBaseConfig } from "./IBaseConfig"; export interface ITraderConfig extends IBaseConfig { kind: "aki-trader"; updateTime: UpdateTime[]; + purchasesAreFoundInRaid: boolean; updateTimeDefault: number; traderPriceMultipler: number; persistPurchaseDataInProfile: boolean; diff --git a/TypeScript/9RouterHooks/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/9RouterHooks/types/models/spt/mod/NewItemDetails.d.ts index fc69a06..9e37cc9 100644 --- a/TypeScript/9RouterHooks/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/mod/NewItemDetails.d.ts @@ -4,6 +4,8 @@ export declare abstract class NewItemDetailsBase { fleaPriceRoubles: number; /** Price of the item in the handbook */ handbookPriceRoubles: number; + /** Handbook ParentId for the new item */ + handbookParentId: string; /** * A dictionary for locale settings, key = langauge (e.g. en,cn,es-mx,jp,fr) * If a language is not included, the first item in the array will be used in its place diff --git a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts index 886a298..55baa1a 100644 --- a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts @@ -63,8 +63,16 @@ export declare class InsuranceService { * @param offraidData post-raid request object * @param preRaidGear gear player wore prior to raid * @param sessionID Session id + * @param playerDied did the player die in raid + */ + storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void; + /** + * Store insured items on pmc death inside insurance array in player profile + * @param pmcData Player profile + * @param offraidData Player gear post-raid + * @param preRaidGear Player gear before raid + * @param sessionID Session id */ - storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; /** * Add gear item to InsuredItems array in player profile