From 6d6665cd82cdeefe3492504ed30924d3dc0d95fd Mon Sep 17 00:00:00 2001 From: Chomp Date: Tue, 14 Jun 2022 20:03:07 +0100 Subject: [PATCH] update types --- TypeScript/10ScopesAndTypes/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/imageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- .../10ScopesAndTypes/types/utils/App.d.ts | 12 +- .../types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../types/utils/JsonUtil.d.ts | 8 +- .../10ScopesAndTypes/types/utils/Logger.d.ts | 42 +++++-- .../types/utils/ObjectId.d.ts | 12 +- .../types/utils/RandomUtil.d.ts | 4 +- .../10ScopesAndTypes/types/utils/VFS.d.ts | 4 +- .../types/utils/Watermark.d.ts | 28 +++-- .../11BundleLoadingSample/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/imageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- .../types/utils/App.d.ts | 12 +- .../types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../types/utils/JsonUtil.d.ts | 8 +- .../types/utils/Logger.d.ts | 42 +++++-- .../types/utils/ObjectId.d.ts | 12 +- .../types/utils/RandomUtil.d.ts | 4 +- .../types/utils/VFS.d.ts | 4 +- .../types/utils/Watermark.d.ts | 28 +++-- .../12ClassExtensionOverride/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/ImageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- .../types/utils/App.d.ts | 12 +- .../types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../types/utils/JsonUtil.d.ts | 8 +- .../types/utils/Logger.d.ts | 42 +++++-- .../types/utils/ObjectId.d.ts | 12 +- .../types/utils/RandomUtil.d.ts | 4 +- .../types/utils/VFS.d.ts | 4 +- .../types/utils/Watermark.d.ts | 28 +++-- TypeScript/1LogToConsole/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/imageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- TypeScript/1LogToConsole/types/utils/App.d.ts | 12 +- .../1LogToConsole/types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../1LogToConsole/types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../1LogToConsole/types/utils/JsonUtil.d.ts | 8 +- .../1LogToConsole/types/utils/Logger.d.ts | 42 +++++-- .../1LogToConsole/types/utils/ObjectId.d.ts | 12 +- .../1LogToConsole/types/utils/RandomUtil.d.ts | 4 +- TypeScript/1LogToConsole/types/utils/VFS.d.ts | 4 +- .../1LogToConsole/types/utils/Watermark.d.ts | 28 +++-- TypeScript/2EditDatabase/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/imageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- TypeScript/2EditDatabase/types/utils/App.d.ts | 12 +- .../2EditDatabase/types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../2EditDatabase/types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../2EditDatabase/types/utils/JsonUtil.d.ts | 8 +- .../2EditDatabase/types/utils/Logger.d.ts | 42 +++++-- .../2EditDatabase/types/utils/ObjectId.d.ts | 12 +- .../2EditDatabase/types/utils/RandomUtil.d.ts | 4 +- TypeScript/2EditDatabase/types/utils/VFS.d.ts | 4 +- .../2EditDatabase/types/utils/Watermark.d.ts | 28 +++-- .../3.0GetSptConfigFile/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/imageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- .../3.0GetSptConfigFile/types/utils/App.d.ts | 12 +- .../types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../types/utils/JsonUtil.d.ts | 8 +- .../types/utils/Logger.d.ts | 42 +++++-- .../types/utils/ObjectId.d.ts | 12 +- .../types/utils/RandomUtil.d.ts | 4 +- .../3.0GetSptConfigFile/types/utils/VFS.d.ts | 4 +- .../types/utils/Watermark.d.ts | 28 +++-- .../4UseACustomConfigFile/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/imageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- .../types/utils/App.d.ts | 12 +- .../types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../types/utils/JsonUtil.d.ts | 8 +- .../types/utils/Logger.d.ts | 42 +++++-- .../types/utils/ObjectId.d.ts | 12 +- .../types/utils/RandomUtil.d.ts | 4 +- .../types/utils/VFS.d.ts | 4 +- .../types/utils/Watermark.d.ts | 28 +++-- TypeScript/5ReplaceMethod/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/imageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- .../5ReplaceMethod/types/utils/App.d.ts | 12 +- .../5ReplaceMethod/types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../5ReplaceMethod/types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../5ReplaceMethod/types/utils/JsonUtil.d.ts | 8 +- .../5ReplaceMethod/types/utils/Logger.d.ts | 42 +++++-- .../5ReplaceMethod/types/utils/ObjectId.d.ts | 12 +- .../types/utils/RandomUtil.d.ts | 4 +- .../5ReplaceMethod/types/utils/VFS.d.ts | 4 +- .../5ReplaceMethod/types/utils/Watermark.d.ts | 28 +++-- .../6ReferenceAnotherClass/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/imageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- .../types/utils/App.d.ts | 12 +- .../types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../types/utils/JsonUtil.d.ts | 8 +- .../types/utils/Logger.d.ts | 42 +++++-- .../types/utils/ObjectId.d.ts | 12 +- .../types/utils/RandomUtil.d.ts | 4 +- .../types/utils/VFS.d.ts | 4 +- .../types/utils/Watermark.d.ts | 28 +++-- TypeScript/7OnLoadHook/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../7OnLoadHook/types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../7OnLoadHook/types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../7OnLoadHook/types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../7OnLoadHook/types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../7OnLoadHook/types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../7OnLoadHook/types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/imageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- TypeScript/7OnLoadHook/types/utils/App.d.ts | 12 +- .../7OnLoadHook/types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../7OnLoadHook/types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../7OnLoadHook/types/utils/JsonUtil.d.ts | 8 +- .../7OnLoadHook/types/utils/Logger.d.ts | 42 +++++-- .../7OnLoadHook/types/utils/ObjectId.d.ts | 12 +- .../7OnLoadHook/types/utils/RandomUtil.d.ts | 4 +- TypeScript/7OnLoadHook/types/utils/VFS.d.ts | 4 +- .../7OnLoadHook/types/utils/Watermark.d.ts | 28 +++-- TypeScript/8OnUpdateHook/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/imageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- TypeScript/8OnUpdateHook/types/utils/App.d.ts | 12 +- .../8OnUpdateHook/types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../8OnUpdateHook/types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../8OnUpdateHook/types/utils/JsonUtil.d.ts | 8 +- .../8OnUpdateHook/types/utils/Logger.d.ts | 42 +++++-- .../8OnUpdateHook/types/utils/ObjectId.d.ts | 12 +- .../8OnUpdateHook/types/utils/RandomUtil.d.ts | 4 +- TypeScript/8OnUpdateHook/types/utils/VFS.d.ts | 4 +- .../8OnUpdateHook/types/utils/Watermark.d.ts | 28 +++-- TypeScript/9RouterHooks/types/Utils.d.ts | 0 .../types/callbacks/BotCallbacks.d.ts | 4 +- .../types/callbacks/BundleCallbacks.d.ts | 13 ++- .../callbacks/CustomizationCallbacks.d.ts | 6 +- .../types/callbacks/DataCallbacks.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +- .../types/callbacks/GameCallbacks.d.ts | 6 +- .../types/callbacks/HandbookCallbacks.d.ts | 2 +- .../types/callbacks/HealthCallbacks.d.ts | 6 +- .../types/callbacks/HideoutCallbacks.d.ts | 7 +- .../types/callbacks/HttpCallbacks.d.ts | 2 +- .../types/callbacks/InraidCallbacks.d.ts | 12 +- .../types/callbacks/InsuranceCallbacks.d.ts | 11 +- .../types/callbacks/InventoryCallbacks.d.ts | 2 +- .../types/callbacks/ItemEventCallbacks.d.ts | 4 +- .../types/callbacks/LauncherCallbacks.d.ts | 8 +- .../types/callbacks/LocationCallbacks.d.ts | 4 +- .../types/callbacks/MatchCallbacks.d.ts | 8 +- .../types/callbacks/ModCallbacks.d.ts | 13 ++- .../types/callbacks/NoteCallbacks.d.ts | 2 +- .../types/callbacks/NotifierCallbacks.d.ts | 8 +- .../types/callbacks/PresetBuildCallbacks.d.ts | 4 +- .../types/callbacks/PresetCallbacks.d.ts | 2 +- .../types/callbacks/ProfileCallbacks.d.ts | 6 +- .../types/callbacks/QuestCallbacks.d.ts | 6 +- .../types/callbacks/RagfairCallbacks.d.ts | 15 +-- .../types/callbacks/RepairCallbacks.d.ts | 2 +- .../types/callbacks/SaveCallbacks.d.ts | 2 +- .../types/callbacks/TradeCallbacks.d.ts | 2 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 4 +- .../types/callbacks/WishlistCallbacks.d.ts | 2 +- .../types/controllers/BotController.d.ts | 16 +-- .../controllers/CustomizationController.d.ts | 12 +- .../types/controllers/DialogueController.d.ts | 12 +- .../types/controllers/GameController.d.ts | 37 +++--- .../types/controllers/HandbookController.d.ts | 4 +- .../types/controllers/HealthController.d.ts | 12 +- .../types/controllers/HideoutController.d.ts | 46 +++++--- .../types/controllers/InraidController.d.ts | 25 +++-- .../controllers/InsuranceController.d.ts | 27 ++--- .../controllers/InventoryController.d.ts | 18 +-- .../types/controllers/LauncherController.d.ts | 15 +-- .../types/controllers/LocationController.d.ts | 10 +- .../types/controllers/MatchController.d.ts | 18 +-- .../types/controllers/NoteController.d.ts | 2 +- .../types/controllers/NotifierController.d.ts | 10 +- .../controllers/PresetBuildController.d.ts | 8 +- .../types/controllers/PresetController.d.ts | 4 +- .../types/controllers/ProfileController.d.ts | 14 +-- .../types/controllers/QuestController.d.ts | 63 ++++++++--- .../types/controllers/RagfairController.d.ts | 49 ++++---- .../types/controllers/RepairController.d.ts | 22 ++-- .../RepeatableQuestController.d.ts | 36 +++--- .../types/controllers/TradeController.d.ts | 10 +- .../types/controllers/TraderController.d.ts | 16 +-- .../types/controllers/WeatherController.d.ts | 7 +- .../types/controllers/WishlistController.d.ts | 2 +- .../types/generators/BotGenerator.d.ts | 50 +++++---- .../generators/BotInventoryGenerator.d.ts | 22 ++-- .../types/generators/BotLootGenerator.d.ts | 26 +++-- .../types/generators/BotWeaponGenerator.d.ts | 96 +++++++++++----- .../types/generators/LocationGenerator.d.ts | 42 +++---- .../types/generators/PMCLootGenerator.d.ts | 13 ++- .../generators/RagfairAssortGenerator.d.ts | 16 +-- .../generators/RagfairOfferGenerator.d.ts | 51 +++++---- .../types/generators/WeatherGenerator.d.ts | 32 ++++-- .../types/helpers/AssortHelper.d.ts | 32 +++++- .../types/helpers/BotGeneratorHelper.d.ts | 105 ++++++++++++++---- .../9RouterHooks/types/helpers/BotHelper.d.ts | 15 +-- .../types/helpers/ContainerHelper.d.ts | 2 +- .../types/helpers/DialogueHelper.d.ts | 12 +- .../types/helpers/DurabilityLimitsHelper.d.ts | 29 ++--- .../types/helpers/ExtendedProfileHelper.d.ts | 18 +-- .../types/helpers/GameEventHelper.d.ts | 2 +- .../types/helpers/GameHelper.d.ts | 11 ++ .../types/helpers/HandbookHelper.d.ts | 2 +- .../types/helpers/HealthHelper.d.ts | 24 ++-- .../types/helpers/HideoutHelper.d.ts | 60 +++++----- .../types/helpers/HttpServerHelper.d.ts | 17 ++- .../types/helpers/InRaidHelper.d.ts | 16 +-- .../types/helpers/InventoryHelper.d.ts | 48 ++++---- .../types/helpers/ItemHelper.d.ts | 12 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 4 +- .../types/helpers/PresetHelper.d.ts | 4 +- .../types/helpers/ProbabilityHelper.d.ts | 14 +++ .../types/helpers/ProfileHelper.d.ts | 4 +- .../types/helpers/QuestConditionHelper.d.ts | 2 +- .../types/helpers/QuestHelper.d.ts | 52 ++++++--- .../types/helpers/RagfairHelper.d.ts | 24 ++-- .../types/helpers/RagfairOfferHelper.d.ts | 47 ++++---- .../types/helpers/RagfairSellHelper.d.ts | 11 +- .../types/helpers/RagfairServerHelper.d.ts | 28 ++--- .../types/helpers/RagfairSortHelper.d.ts | 12 +- .../types/helpers/RagfairTaxHelper.d.ts | 11 +- .../types/helpers/RepairHelper.d.ts | 21 ++-- .../types/helpers/SecureContainerHelper.d.ts | 2 +- .../types/helpers/TradeHelper.d.ts | 22 ++-- .../types/helpers/TraderAssortHelper.d.ts | 41 +++++-- .../types/helpers/TraderHelper.d.ts | 40 +++++-- .../types/loaders/BundleLoader.d.ts | 8 +- .../types/loaders/DelayedModLoader.d.ts | 16 +-- .../types/loaders/InitialModLoader.d.ts | 56 +++++----- .../eft/common/tables/ITemplateItem.d.ts | 95 ++++++++-------- .../types/models/enums/QuestStatus.d.ts | 10 ++ .../types/models/spt/mod/IModLoader.d.ts | 1 - .../types/models/spt/server/ILocaleBase.d.ts | 2 +- .../types/routers/HttpRouter.d.ts | 15 ++- .../types/routers/ImageRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 12 +- .../routers/dynamic/BotDynamicRouter.d.ts | 2 +- .../routers/dynamic/BundleDynamicRouter.d.ts | 2 +- .../dynamic/CustomizationDynamicRouter.d.ts | 2 +- .../routers/dynamic/DataDynamicRouter.d.ts | 2 +- .../routers/dynamic/HttpDynamicRouter.d.ts | 2 +- .../routers/dynamic/InraidDynamicRouter.d.ts | 2 +- .../dynamic/LocationDynamicRouter.d.ts | 2 +- .../dynamic/NotifierDynamicRouter.d.ts | 2 +- .../routers/dynamic/TraderDynamicRouter.d.ts | 2 +- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../PresetBuildItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 12 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../routers/serializers/BundleSerializer.d.ts | 4 +- .../routers/serializers/ImageSerializer.d.ts | 2 +- .../routers/serializers/NotifySerializer.d.ts | 6 +- .../types/routers/static/BotStaticRouter.d.ts | 2 +- .../routers/static/BundleStaticRouter.d.ts | 2 +- .../static/CustomizationStaticRouter.d.ts | 2 +- .../routers/static/DataStaticRouter.d.ts | 2 +- .../routers/static/DialogStaticRouter.d.ts | 2 +- .../routers/static/GameStaticRouter.d.ts | 2 +- .../routers/static/HealthStaticRouter.d.ts | 2 +- .../routers/static/InraidStaticRouter.d.ts | 2 +- .../routers/static/InsuranceStaticRouter.d.ts | 2 +- .../routers/static/ItemEventStaticRouter.d.ts | 2 +- .../routers/static/LauncherStaticRouter.d.ts | 2 +- .../routers/static/LocationStaticRouter.d.ts | 2 +- .../routers/static/MatchStaticRouter.d.ts | 2 +- .../routers/static/NotifierStaticRouter.d.ts | 2 +- .../routers/static/PresetStaticRouter.d.ts | 2 +- .../routers/static/ProfileStaticRouter.d.ts | 2 +- .../routers/static/QuestStaticRouter.d.ts | 2 +- .../routers/static/RagfairStaticRouter.d.ts | 2 +- .../routers/static/TraderStaticRouter.d.ts | 2 +- .../routers/static/WeatherStaticRouter.d.ts | 2 +- .../types/servers/ConfigServer.d.ts | 8 +- .../types/servers/DatabaseServer.d.ts | 2 +- .../types/servers/HttpServer.d.ts | 35 +++--- .../types/servers/RagfairServer.d.ts | 15 +-- .../types/servers/SaveServer.d.ts | 18 +-- .../types/services/FenceService.d.ts | 25 +++-- .../types/services/HashCacheService.d.ts | 14 +-- .../types/services/InsuranceService.d.ts | 27 ++--- .../types/services/MatchLocationService.d.ts | 4 +- .../types/services/ModCompilerService.d.ts | 25 +++-- .../types/services/NotificationService.d.ts | 2 +- .../types/services/PaymentService.d.ts | 19 ++-- .../types/services/PlayerService.d.ts | 4 +- .../services/RagfairCategoriesService.d.ts | 2 +- .../services/RagfairLinkedItemService.d.ts | 9 +- .../types/services/RagfairOfferService.d.ts | 38 ++++--- .../types/services/RagfairPriceService.d.ts | 20 ++-- .../services/RagfairRequiredItemsService.d.ts | 8 +- .../types/services/TraderAssortService.d.ts | 2 +- .../services/mod/image/imageRouteService.d.ts | 2 +- .../services/mod/onLoad/OnLoadModService.d.ts | 2 +- .../mod/onUpdate/OnUpdateModService.d.ts | 2 +- .../staticRouter/StaticRouterModService.d.ts | 2 +- TypeScript/9RouterHooks/types/utils/App.d.ts | 12 +- .../9RouterHooks/types/utils/AyncQueue.d.ts | 2 +- .../types/utils/DatabaseImporter.d.ts | 10 +- .../9RouterHooks/types/utils/HashUtil.d.ts | 2 +- .../types/utils/HttpResponseUtil.d.ts | 4 +- .../9RouterHooks/types/utils/JsonUtil.d.ts | 8 +- .../9RouterHooks/types/utils/Logger.d.ts | 42 +++++-- .../9RouterHooks/types/utils/ObjectId.d.ts | 12 +- .../9RouterHooks/types/utils/RandomUtil.d.ts | 4 +- TypeScript/9RouterHooks/types/utils/VFS.d.ts | 4 +- .../9RouterHooks/types/utils/Watermark.d.ts | 28 +++-- 2268 files changed, 17544 insertions(+), 12528 deletions(-) delete mode 100644 TypeScript/10ScopesAndTypes/types/Utils.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/QuestStatus.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/Utils.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/QuestStatus.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/Utils.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/QuestStatus.d.ts delete mode 100644 TypeScript/1LogToConsole/types/Utils.d.ts create mode 100644 TypeScript/1LogToConsole/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/1LogToConsole/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/QuestStatus.d.ts delete mode 100644 TypeScript/2EditDatabase/types/Utils.d.ts create mode 100644 TypeScript/2EditDatabase/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/2EditDatabase/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/QuestStatus.d.ts delete mode 100644 TypeScript/3.0GetSptConfigFile/types/Utils.d.ts create mode 100644 TypeScript/3.0GetSptConfigFile/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/3.0GetSptConfigFile/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/3.0GetSptConfigFile/types/models/enums/QuestStatus.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/Utils.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/QuestStatus.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/Utils.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/QuestStatus.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/Utils.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/QuestStatus.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/Utils.d.ts create mode 100644 TypeScript/7OnLoadHook/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/7OnLoadHook/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/QuestStatus.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/Utils.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/QuestStatus.d.ts delete mode 100644 TypeScript/9RouterHooks/types/Utils.d.ts create mode 100644 TypeScript/9RouterHooks/types/helpers/GameHelper.d.ts create mode 100644 TypeScript/9RouterHooks/types/helpers/ProbabilityHelper.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/QuestStatus.d.ts diff --git a/TypeScript/10ScopesAndTypes/types/Utils.d.ts b/TypeScript/10ScopesAndTypes/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/BundleCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/HealthCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/HttpCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/ModCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/NoteCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/PresetCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/QuestCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/RepairCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/SaveCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/TradeCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/CustomizationController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/CustomizationController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/HandbookController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/HandbookController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/NoteController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/NoteController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/NotifierController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/NotifierController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/10ScopesAndTypes/types/controllers/PresetBuildController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/PresetController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/PresetController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/ProfileController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/ProfileController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/RepairController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/RepairController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/WishlistController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/WishlistController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/PMCLootGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/AssortHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/AssortHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ContainerHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/GameEventHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/GameHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HttpServerHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ProbabilityHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/QuestConditionHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairSellHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairSortHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/SecureContainerHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/TraderAssortHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts b/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/10ScopesAndTypes/types/loaders/DelayedModLoader.d.ts b/TypeScript/10ScopesAndTypes/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/10ScopesAndTypes/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/10ScopesAndTypes/types/loaders/InitialModLoader.d.ts b/TypeScript/10ScopesAndTypes/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/10ScopesAndTypes/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/QuestStatus.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/mod/IModLoader.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/HttpRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/HttpRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/10ScopesAndTypes/types/routers/ImageRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/ImageRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/10ScopesAndTypes/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/10ScopesAndTypes/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/10ScopesAndTypes/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/10ScopesAndTypes/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/10ScopesAndTypes/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/BotStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/DataStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/GameStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/10ScopesAndTypes/types/servers/ConfigServer.d.ts b/TypeScript/10ScopesAndTypes/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/ConfigServer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/10ScopesAndTypes/types/servers/DatabaseServer.d.ts b/TypeScript/10ScopesAndTypes/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/DatabaseServer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/10ScopesAndTypes/types/servers/HttpServer.d.ts b/TypeScript/10ScopesAndTypes/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/HttpServer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/10ScopesAndTypes/types/servers/RagfairServer.d.ts b/TypeScript/10ScopesAndTypes/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/RagfairServer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts b/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/10ScopesAndTypes/types/services/HashCacheService.d.ts b/TypeScript/10ScopesAndTypes/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/10ScopesAndTypes/types/services/HashCacheService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/10ScopesAndTypes/types/services/MatchLocationService.d.ts b/TypeScript/10ScopesAndTypes/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/10ScopesAndTypes/types/services/MatchLocationService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/10ScopesAndTypes/types/services/ModCompilerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ModCompilerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/services/NotificationService.d.ts b/TypeScript/10ScopesAndTypes/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/10ScopesAndTypes/types/services/NotificationService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts b/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/services/PlayerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/10ScopesAndTypes/types/services/PlayerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/10ScopesAndTypes/types/services/RagfairCategoriesService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/10ScopesAndTypes/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/10ScopesAndTypes/types/services/RagfairLinkedItemService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/10ScopesAndTypes/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/10ScopesAndTypes/types/services/RagfairOfferService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/10ScopesAndTypes/types/services/RagfairOfferService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/10ScopesAndTypes/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/10ScopesAndTypes/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/10ScopesAndTypes/types/services/TraderAssortService.d.ts b/TypeScript/10ScopesAndTypes/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/10ScopesAndTypes/types/services/TraderAssortService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/10ScopesAndTypes/types/services/mod/image/imageRouteService.d.ts b/TypeScript/10ScopesAndTypes/types/services/mod/image/imageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/10ScopesAndTypes/types/services/mod/image/imageRouteService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/mod/image/imageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/10ScopesAndTypes/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/10ScopesAndTypes/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/10ScopesAndTypes/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/10ScopesAndTypes/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/10ScopesAndTypes/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/10ScopesAndTypes/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/10ScopesAndTypes/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/10ScopesAndTypes/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/10ScopesAndTypes/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/10ScopesAndTypes/types/utils/App.d.ts b/TypeScript/10ScopesAndTypes/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/App.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/10ScopesAndTypes/types/utils/AyncQueue.d.ts b/TypeScript/10ScopesAndTypes/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/AyncQueue.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts b/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/10ScopesAndTypes/types/utils/HashUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/HashUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/10ScopesAndTypes/types/utils/HttpResponseUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/10ScopesAndTypes/types/utils/Logger.d.ts b/TypeScript/10ScopesAndTypes/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/Logger.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/10ScopesAndTypes/types/utils/ObjectId.d.ts b/TypeScript/10ScopesAndTypes/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/ObjectId.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/10ScopesAndTypes/types/utils/RandomUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/RandomUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts b/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/10ScopesAndTypes/types/utils/Watermark.d.ts b/TypeScript/10ScopesAndTypes/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/Watermark.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; } diff --git a/TypeScript/11BundleLoadingSample/types/Utils.d.ts b/TypeScript/11BundleLoadingSample/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/BundleCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/HealthCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/HttpCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/ModCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/NoteCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/PresetCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/QuestCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/RepairCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/SaveCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/TradeCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/CustomizationController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/CustomizationController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/HandbookController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/HandbookController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/NoteController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/NoteController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/NotifierController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/NotifierController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/11BundleLoadingSample/types/controllers/PresetBuildController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/PresetController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/PresetController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/ProfileController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/ProfileController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/RepairController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/RepairController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/WishlistController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/WishlistController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/PMCLootGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/AssortHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/AssortHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ContainerHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/GameEventHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/GameHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HttpServerHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ProbabilityHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/QuestConditionHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairSellHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairSortHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/SecureContainerHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/TraderAssortHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts b/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/11BundleLoadingSample/types/loaders/DelayedModLoader.d.ts b/TypeScript/11BundleLoadingSample/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/11BundleLoadingSample/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/11BundleLoadingSample/types/loaders/InitialModLoader.d.ts b/TypeScript/11BundleLoadingSample/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/11BundleLoadingSample/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/QuestStatus.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/mod/IModLoader.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/HttpRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/HttpRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/11BundleLoadingSample/types/routers/ImageRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/ImageRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/11BundleLoadingSample/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/11BundleLoadingSample/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/11BundleLoadingSample/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/11BundleLoadingSample/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/11BundleLoadingSample/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/BotStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/DataStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/GameStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/11BundleLoadingSample/types/servers/ConfigServer.d.ts b/TypeScript/11BundleLoadingSample/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/ConfigServer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/11BundleLoadingSample/types/servers/DatabaseServer.d.ts b/TypeScript/11BundleLoadingSample/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/DatabaseServer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/11BundleLoadingSample/types/servers/HttpServer.d.ts b/TypeScript/11BundleLoadingSample/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/HttpServer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/11BundleLoadingSample/types/servers/RagfairServer.d.ts b/TypeScript/11BundleLoadingSample/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/RagfairServer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts b/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/11BundleLoadingSample/types/services/HashCacheService.d.ts b/TypeScript/11BundleLoadingSample/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/11BundleLoadingSample/types/services/HashCacheService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/11BundleLoadingSample/types/services/MatchLocationService.d.ts b/TypeScript/11BundleLoadingSample/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/11BundleLoadingSample/types/services/MatchLocationService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/11BundleLoadingSample/types/services/ModCompilerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ModCompilerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/services/NotificationService.d.ts b/TypeScript/11BundleLoadingSample/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/11BundleLoadingSample/types/services/NotificationService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts b/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/services/PlayerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/11BundleLoadingSample/types/services/PlayerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/11BundleLoadingSample/types/services/RagfairCategoriesService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/11BundleLoadingSample/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/11BundleLoadingSample/types/services/RagfairLinkedItemService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/11BundleLoadingSample/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/11BundleLoadingSample/types/services/RagfairOfferService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/11BundleLoadingSample/types/services/RagfairOfferService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/11BundleLoadingSample/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/11BundleLoadingSample/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/11BundleLoadingSample/types/services/TraderAssortService.d.ts b/TypeScript/11BundleLoadingSample/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/11BundleLoadingSample/types/services/TraderAssortService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/11BundleLoadingSample/types/services/mod/image/imageRouteService.d.ts b/TypeScript/11BundleLoadingSample/types/services/mod/image/imageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/11BundleLoadingSample/types/services/mod/image/imageRouteService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/mod/image/imageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/11BundleLoadingSample/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/11BundleLoadingSample/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/11BundleLoadingSample/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/11BundleLoadingSample/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/11BundleLoadingSample/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/11BundleLoadingSample/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/11BundleLoadingSample/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/11BundleLoadingSample/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/11BundleLoadingSample/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/11BundleLoadingSample/types/utils/App.d.ts b/TypeScript/11BundleLoadingSample/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/App.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/11BundleLoadingSample/types/utils/AyncQueue.d.ts b/TypeScript/11BundleLoadingSample/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/AyncQueue.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts b/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/11BundleLoadingSample/types/utils/HashUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/HashUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/11BundleLoadingSample/types/utils/HttpResponseUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/11BundleLoadingSample/types/utils/Logger.d.ts b/TypeScript/11BundleLoadingSample/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/Logger.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/11BundleLoadingSample/types/utils/ObjectId.d.ts b/TypeScript/11BundleLoadingSample/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/ObjectId.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/11BundleLoadingSample/types/utils/RandomUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/RandomUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts b/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/11BundleLoadingSample/types/utils/Watermark.d.ts b/TypeScript/11BundleLoadingSample/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/Watermark.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/Utils.d.ts b/TypeScript/12ClassExtensionOverride/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/BundleCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/HealthCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/HttpCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/ModCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/NoteCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/PresetCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/QuestCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/RepairCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/SaveCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/TradeCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/CustomizationController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/CustomizationController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/HandbookController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/HandbookController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/NoteController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/NoteController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/NotifierController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/NotifierController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/PresetBuildController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/PresetController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/PresetController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/ProfileController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/ProfileController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/RepairController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/RepairController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/WishlistController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/WishlistController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/PMCLootGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/AssortHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/AssortHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ContainerHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/GameEventHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/GameHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HttpServerHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ProbabilityHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/QuestConditionHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairSellHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairSortHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/SecureContainerHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/TraderAssortHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts b/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/12ClassExtensionOverride/types/loaders/DelayedModLoader.d.ts b/TypeScript/12ClassExtensionOverride/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/12ClassExtensionOverride/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/loaders/InitialModLoader.d.ts b/TypeScript/12ClassExtensionOverride/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/12ClassExtensionOverride/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/QuestStatus.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/mod/IModLoader.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/HttpRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/HttpRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/ImageRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/ImageRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/BotStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/DataStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/GameStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/12ClassExtensionOverride/types/servers/ConfigServer.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/ConfigServer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/12ClassExtensionOverride/types/servers/DatabaseServer.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/DatabaseServer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/servers/HttpServer.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/HttpServer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/servers/RagfairServer.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/RagfairServer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/12ClassExtensionOverride/types/services/HashCacheService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/HashCacheService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/MatchLocationService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/MatchLocationService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/12ClassExtensionOverride/types/services/ModCompilerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ModCompilerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/NotificationService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/NotificationService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/PlayerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/PlayerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/12ClassExtensionOverride/types/services/RagfairCategoriesService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/12ClassExtensionOverride/types/services/RagfairLinkedItemService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/RagfairOfferService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/RagfairOfferService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/12ClassExtensionOverride/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/12ClassExtensionOverride/types/services/TraderAssortService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/TraderAssortService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/mod/image/ImageRouteService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/mod/image/ImageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/mod/image/ImageRouteService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/mod/image/ImageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/utils/App.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/App.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/utils/AyncQueue.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/AyncQueue.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/12ClassExtensionOverride/types/utils/HashUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/HashUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/12ClassExtensionOverride/types/utils/HttpResponseUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/12ClassExtensionOverride/types/utils/Logger.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/Logger.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/12ClassExtensionOverride/types/utils/ObjectId.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/ObjectId.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/12ClassExtensionOverride/types/utils/RandomUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/RandomUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/12ClassExtensionOverride/types/utils/Watermark.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/Watermark.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; } diff --git a/TypeScript/1LogToConsole/types/Utils.d.ts b/TypeScript/1LogToConsole/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/1LogToConsole/types/callbacks/BundleCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/1LogToConsole/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/1LogToConsole/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/1LogToConsole/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/1LogToConsole/types/callbacks/DataCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/1LogToConsole/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/1LogToConsole/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/1LogToConsole/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/1LogToConsole/types/callbacks/HealthCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/1LogToConsole/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/1LogToConsole/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/callbacks/HttpCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/1LogToConsole/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/1LogToConsole/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/1LogToConsole/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/1LogToConsole/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/1LogToConsole/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/1LogToConsole/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/1LogToConsole/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/1LogToConsole/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/1LogToConsole/types/callbacks/LocationCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/1LogToConsole/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/1LogToConsole/types/callbacks/ModCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/1LogToConsole/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/1LogToConsole/types/callbacks/NoteCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/1LogToConsole/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/1LogToConsole/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/1LogToConsole/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/1LogToConsole/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/callbacks/PresetCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/1LogToConsole/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/1LogToConsole/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/1LogToConsole/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/1LogToConsole/types/callbacks/QuestCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/1LogToConsole/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/1LogToConsole/types/callbacks/RepairCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/1LogToConsole/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/callbacks/SaveCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/1LogToConsole/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/1LogToConsole/types/callbacks/TradeCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/1LogToConsole/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/callbacks/TraderCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/1LogToConsole/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/1LogToConsole/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/1LogToConsole/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/1LogToConsole/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/1LogToConsole/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/controllers/BotController.d.ts b/TypeScript/1LogToConsole/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/1LogToConsole/types/controllers/BotController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/1LogToConsole/types/controllers/CustomizationController.d.ts b/TypeScript/1LogToConsole/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/1LogToConsole/types/controllers/CustomizationController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts b/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/1LogToConsole/types/controllers/HandbookController.d.ts b/TypeScript/1LogToConsole/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/1LogToConsole/types/controllers/HandbookController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts b/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts b/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts b/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts b/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/1LogToConsole/types/controllers/NoteController.d.ts b/TypeScript/1LogToConsole/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/1LogToConsole/types/controllers/NoteController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/controllers/NotifierController.d.ts b/TypeScript/1LogToConsole/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/1LogToConsole/types/controllers/NotifierController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/1LogToConsole/types/controllers/PresetBuildController.d.ts b/TypeScript/1LogToConsole/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/1LogToConsole/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/controllers/PresetController.d.ts b/TypeScript/1LogToConsole/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/1LogToConsole/types/controllers/PresetController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/1LogToConsole/types/controllers/ProfileController.d.ts b/TypeScript/1LogToConsole/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/1LogToConsole/types/controllers/ProfileController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts b/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/1LogToConsole/types/controllers/RepairController.d.ts b/TypeScript/1LogToConsole/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/1LogToConsole/types/controllers/RepairController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts b/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts b/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/controllers/TraderController.d.ts b/TypeScript/1LogToConsole/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/1LogToConsole/types/controllers/TraderController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts b/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/1LogToConsole/types/controllers/WishlistController.d.ts b/TypeScript/1LogToConsole/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/1LogToConsole/types/controllers/WishlistController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/1LogToConsole/types/generators/PMCLootGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/1LogToConsole/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/1LogToConsole/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/1LogToConsole/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/1LogToConsole/types/helpers/ContainerHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/1LogToConsole/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/1LogToConsole/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/1LogToConsole/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/1LogToConsole/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/1LogToConsole/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/1LogToConsole/types/helpers/GameEventHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/1LogToConsole/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/1LogToConsole/types/helpers/GameHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/1LogToConsole/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/1LogToConsole/types/helpers/HandbookHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/1LogToConsole/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/1LogToConsole/types/helpers/HttpServerHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/1LogToConsole/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/1LogToConsole/types/helpers/ProbabilityHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/1LogToConsole/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/1LogToConsole/types/helpers/QuestConditionHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/1LogToConsole/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairSellHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairServerHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairSortHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/1LogToConsole/types/helpers/SecureContainerHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/1LogToConsole/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/1LogToConsole/types/helpers/TradeHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/1LogToConsole/types/helpers/TradeHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/1LogToConsole/types/helpers/TraderAssortHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/1LogToConsole/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/1LogToConsole/types/loaders/BundleLoader.d.ts b/TypeScript/1LogToConsole/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/1LogToConsole/types/loaders/BundleLoader.d.ts +++ b/TypeScript/1LogToConsole/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/1LogToConsole/types/loaders/DelayedModLoader.d.ts b/TypeScript/1LogToConsole/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/1LogToConsole/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/1LogToConsole/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/1LogToConsole/types/loaders/InitialModLoader.d.ts b/TypeScript/1LogToConsole/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/1LogToConsole/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/1LogToConsole/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/1LogToConsole/types/models/enums/QuestStatus.d.ts b/TypeScript/1LogToConsole/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/1LogToConsole/types/models/spt/mod/IModLoader.d.ts b/TypeScript/1LogToConsole/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/1LogToConsole/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/1LogToConsole/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/1LogToConsole/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/1LogToConsole/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/1LogToConsole/types/routers/HttpRouter.d.ts b/TypeScript/1LogToConsole/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/1LogToConsole/types/routers/HttpRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/1LogToConsole/types/routers/ImageRouter.d.ts b/TypeScript/1LogToConsole/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/1LogToConsole/types/routers/ImageRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/1LogToConsole/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/1LogToConsole/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/1LogToConsole/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/1LogToConsole/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/1LogToConsole/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/1LogToConsole/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/1LogToConsole/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/1LogToConsole/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/1LogToConsole/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/1LogToConsole/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/1LogToConsole/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/1LogToConsole/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/1LogToConsole/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/1LogToConsole/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/1LogToConsole/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/1LogToConsole/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/1LogToConsole/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/1LogToConsole/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/1LogToConsole/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/1LogToConsole/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/1LogToConsole/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/1LogToConsole/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/1LogToConsole/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/1LogToConsole/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/1LogToConsole/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/1LogToConsole/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/1LogToConsole/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/1LogToConsole/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/1LogToConsole/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/1LogToConsole/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/1LogToConsole/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/1LogToConsole/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/1LogToConsole/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/1LogToConsole/types/routers/static/BotStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/1LogToConsole/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/1LogToConsole/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/1LogToConsole/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/DataStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/1LogToConsole/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/1LogToConsole/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/GameStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/1LogToConsole/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/1LogToConsole/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/1LogToConsole/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/1LogToConsole/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/1LogToConsole/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/1LogToConsole/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/1LogToConsole/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/1LogToConsole/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/1LogToConsole/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/1LogToConsole/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/1LogToConsole/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/1LogToConsole/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/1LogToConsole/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/1LogToConsole/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/1LogToConsole/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/1LogToConsole/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/1LogToConsole/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/1LogToConsole/types/servers/ConfigServer.d.ts b/TypeScript/1LogToConsole/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/1LogToConsole/types/servers/ConfigServer.d.ts +++ b/TypeScript/1LogToConsole/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/1LogToConsole/types/servers/DatabaseServer.d.ts b/TypeScript/1LogToConsole/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/1LogToConsole/types/servers/DatabaseServer.d.ts +++ b/TypeScript/1LogToConsole/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/1LogToConsole/types/servers/HttpServer.d.ts b/TypeScript/1LogToConsole/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/1LogToConsole/types/servers/HttpServer.d.ts +++ b/TypeScript/1LogToConsole/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/1LogToConsole/types/servers/RagfairServer.d.ts b/TypeScript/1LogToConsole/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/1LogToConsole/types/servers/RagfairServer.d.ts +++ b/TypeScript/1LogToConsole/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts b/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts +++ b/TypeScript/1LogToConsole/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/1LogToConsole/types/services/FenceService.d.ts b/TypeScript/1LogToConsole/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/1LogToConsole/types/services/FenceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/1LogToConsole/types/services/HashCacheService.d.ts b/TypeScript/1LogToConsole/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/1LogToConsole/types/services/HashCacheService.d.ts +++ b/TypeScript/1LogToConsole/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/1LogToConsole/types/services/MatchLocationService.d.ts b/TypeScript/1LogToConsole/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/1LogToConsole/types/services/MatchLocationService.d.ts +++ b/TypeScript/1LogToConsole/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/1LogToConsole/types/services/ModCompilerService.d.ts b/TypeScript/1LogToConsole/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/1LogToConsole/types/services/ModCompilerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/1LogToConsole/types/services/NotificationService.d.ts b/TypeScript/1LogToConsole/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/1LogToConsole/types/services/NotificationService.d.ts +++ b/TypeScript/1LogToConsole/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/1LogToConsole/types/services/PaymentService.d.ts b/TypeScript/1LogToConsole/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/1LogToConsole/types/services/PaymentService.d.ts +++ b/TypeScript/1LogToConsole/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/1LogToConsole/types/services/PlayerService.d.ts b/TypeScript/1LogToConsole/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/1LogToConsole/types/services/PlayerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/1LogToConsole/types/services/RagfairCategoriesService.d.ts b/TypeScript/1LogToConsole/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/1LogToConsole/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/1LogToConsole/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/1LogToConsole/types/services/RagfairLinkedItemService.d.ts b/TypeScript/1LogToConsole/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/1LogToConsole/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/1LogToConsole/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/1LogToConsole/types/services/RagfairOfferService.d.ts b/TypeScript/1LogToConsole/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/1LogToConsole/types/services/RagfairOfferService.d.ts +++ b/TypeScript/1LogToConsole/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/1LogToConsole/types/services/RagfairPriceService.d.ts b/TypeScript/1LogToConsole/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/1LogToConsole/types/services/RagfairPriceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/1LogToConsole/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/1LogToConsole/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/1LogToConsole/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/1LogToConsole/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/1LogToConsole/types/services/TraderAssortService.d.ts b/TypeScript/1LogToConsole/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/1LogToConsole/types/services/TraderAssortService.d.ts +++ b/TypeScript/1LogToConsole/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/1LogToConsole/types/services/mod/image/imageRouteService.d.ts b/TypeScript/1LogToConsole/types/services/mod/image/imageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/1LogToConsole/types/services/mod/image/imageRouteService.d.ts +++ b/TypeScript/1LogToConsole/types/services/mod/image/imageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/1LogToConsole/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/1LogToConsole/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/1LogToConsole/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/1LogToConsole/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/1LogToConsole/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/1LogToConsole/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/1LogToConsole/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/1LogToConsole/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/1LogToConsole/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/1LogToConsole/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/1LogToConsole/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/1LogToConsole/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/1LogToConsole/types/utils/App.d.ts b/TypeScript/1LogToConsole/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/1LogToConsole/types/utils/App.d.ts +++ b/TypeScript/1LogToConsole/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/1LogToConsole/types/utils/AyncQueue.d.ts b/TypeScript/1LogToConsole/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/1LogToConsole/types/utils/AyncQueue.d.ts +++ b/TypeScript/1LogToConsole/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts b/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/1LogToConsole/types/utils/HashUtil.d.ts b/TypeScript/1LogToConsole/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/1LogToConsole/types/utils/HashUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/1LogToConsole/types/utils/HttpResponseUtil.d.ts b/TypeScript/1LogToConsole/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/1LogToConsole/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts b/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/1LogToConsole/types/utils/Logger.d.ts b/TypeScript/1LogToConsole/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/1LogToConsole/types/utils/Logger.d.ts +++ b/TypeScript/1LogToConsole/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/1LogToConsole/types/utils/ObjectId.d.ts b/TypeScript/1LogToConsole/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/1LogToConsole/types/utils/ObjectId.d.ts +++ b/TypeScript/1LogToConsole/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/1LogToConsole/types/utils/RandomUtil.d.ts b/TypeScript/1LogToConsole/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/1LogToConsole/types/utils/RandomUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/1LogToConsole/types/utils/VFS.d.ts b/TypeScript/1LogToConsole/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/1LogToConsole/types/utils/VFS.d.ts +++ b/TypeScript/1LogToConsole/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/1LogToConsole/types/utils/Watermark.d.ts b/TypeScript/1LogToConsole/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/1LogToConsole/types/utils/Watermark.d.ts +++ b/TypeScript/1LogToConsole/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; } diff --git a/TypeScript/2EditDatabase/types/Utils.d.ts b/TypeScript/2EditDatabase/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/2EditDatabase/types/callbacks/BotCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/2EditDatabase/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/2EditDatabase/types/callbacks/BundleCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/2EditDatabase/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/2EditDatabase/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/2EditDatabase/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/2EditDatabase/types/callbacks/DataCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/2EditDatabase/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/2EditDatabase/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/2EditDatabase/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/2EditDatabase/types/callbacks/HealthCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/2EditDatabase/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/2EditDatabase/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/callbacks/HttpCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/2EditDatabase/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/2EditDatabase/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/2EditDatabase/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/2EditDatabase/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/2EditDatabase/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/2EditDatabase/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/2EditDatabase/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/2EditDatabase/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/2EditDatabase/types/callbacks/LocationCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/2EditDatabase/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/2EditDatabase/types/callbacks/ModCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/2EditDatabase/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/2EditDatabase/types/callbacks/NoteCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/2EditDatabase/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/2EditDatabase/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/2EditDatabase/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/2EditDatabase/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/callbacks/PresetCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/2EditDatabase/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/2EditDatabase/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/2EditDatabase/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/2EditDatabase/types/callbacks/QuestCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/2EditDatabase/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/2EditDatabase/types/callbacks/RepairCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/2EditDatabase/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/callbacks/SaveCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/2EditDatabase/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/2EditDatabase/types/callbacks/TradeCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/2EditDatabase/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/callbacks/TraderCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/2EditDatabase/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/2EditDatabase/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/2EditDatabase/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/2EditDatabase/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/2EditDatabase/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/controllers/BotController.d.ts b/TypeScript/2EditDatabase/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/2EditDatabase/types/controllers/BotController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/2EditDatabase/types/controllers/CustomizationController.d.ts b/TypeScript/2EditDatabase/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/2EditDatabase/types/controllers/CustomizationController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts b/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/2EditDatabase/types/controllers/HandbookController.d.ts b/TypeScript/2EditDatabase/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/2EditDatabase/types/controllers/HandbookController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts b/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts b/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts b/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts b/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts b/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/2EditDatabase/types/controllers/NoteController.d.ts b/TypeScript/2EditDatabase/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/2EditDatabase/types/controllers/NoteController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/controllers/NotifierController.d.ts b/TypeScript/2EditDatabase/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/2EditDatabase/types/controllers/NotifierController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/2EditDatabase/types/controllers/PresetBuildController.d.ts b/TypeScript/2EditDatabase/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/2EditDatabase/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/controllers/PresetController.d.ts b/TypeScript/2EditDatabase/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/2EditDatabase/types/controllers/PresetController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/2EditDatabase/types/controllers/ProfileController.d.ts b/TypeScript/2EditDatabase/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/2EditDatabase/types/controllers/ProfileController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts b/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts b/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/2EditDatabase/types/controllers/RepairController.d.ts b/TypeScript/2EditDatabase/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/2EditDatabase/types/controllers/RepairController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts b/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts b/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/controllers/TraderController.d.ts b/TypeScript/2EditDatabase/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/2EditDatabase/types/controllers/TraderController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts b/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/2EditDatabase/types/controllers/WishlistController.d.ts b/TypeScript/2EditDatabase/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/2EditDatabase/types/controllers/WishlistController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/2EditDatabase/types/generators/PMCLootGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/2EditDatabase/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/2EditDatabase/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/2EditDatabase/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/2EditDatabase/types/helpers/AssortHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/2EditDatabase/types/helpers/AssortHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/2EditDatabase/types/helpers/ContainerHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/2EditDatabase/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/2EditDatabase/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/2EditDatabase/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/2EditDatabase/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/2EditDatabase/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/2EditDatabase/types/helpers/GameEventHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/2EditDatabase/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/2EditDatabase/types/helpers/GameHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/2EditDatabase/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/2EditDatabase/types/helpers/HandbookHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/2EditDatabase/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/2EditDatabase/types/helpers/HttpServerHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/2EditDatabase/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/2EditDatabase/types/helpers/ProbabilityHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/2EditDatabase/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/2EditDatabase/types/helpers/QuestConditionHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/2EditDatabase/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairSellHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairServerHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairSortHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/2EditDatabase/types/helpers/SecureContainerHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/2EditDatabase/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/2EditDatabase/types/helpers/TraderAssortHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/2EditDatabase/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/2EditDatabase/types/helpers/TraderHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/2EditDatabase/types/helpers/TraderHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/2EditDatabase/types/loaders/BundleLoader.d.ts b/TypeScript/2EditDatabase/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/2EditDatabase/types/loaders/BundleLoader.d.ts +++ b/TypeScript/2EditDatabase/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/2EditDatabase/types/loaders/DelayedModLoader.d.ts b/TypeScript/2EditDatabase/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/2EditDatabase/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/2EditDatabase/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/2EditDatabase/types/loaders/InitialModLoader.d.ts b/TypeScript/2EditDatabase/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/2EditDatabase/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/2EditDatabase/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/2EditDatabase/types/models/enums/QuestStatus.d.ts b/TypeScript/2EditDatabase/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/2EditDatabase/types/models/spt/mod/IModLoader.d.ts b/TypeScript/2EditDatabase/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/2EditDatabase/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/2EditDatabase/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/2EditDatabase/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/2EditDatabase/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/2EditDatabase/types/routers/HttpRouter.d.ts b/TypeScript/2EditDatabase/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/2EditDatabase/types/routers/HttpRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/2EditDatabase/types/routers/ImageRouter.d.ts b/TypeScript/2EditDatabase/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/2EditDatabase/types/routers/ImageRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/2EditDatabase/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/2EditDatabase/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/2EditDatabase/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/2EditDatabase/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/2EditDatabase/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/2EditDatabase/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/2EditDatabase/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/2EditDatabase/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/2EditDatabase/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/2EditDatabase/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/2EditDatabase/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/2EditDatabase/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/2EditDatabase/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/2EditDatabase/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/2EditDatabase/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/2EditDatabase/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/2EditDatabase/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/2EditDatabase/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/2EditDatabase/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/2EditDatabase/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/2EditDatabase/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/2EditDatabase/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/2EditDatabase/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/2EditDatabase/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/2EditDatabase/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/2EditDatabase/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/2EditDatabase/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/2EditDatabase/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/2EditDatabase/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/2EditDatabase/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/2EditDatabase/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/2EditDatabase/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/2EditDatabase/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/2EditDatabase/types/routers/static/BotStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/2EditDatabase/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/2EditDatabase/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/2EditDatabase/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/DataStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/2EditDatabase/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/2EditDatabase/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/GameStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/2EditDatabase/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/2EditDatabase/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/2EditDatabase/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/2EditDatabase/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/2EditDatabase/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/2EditDatabase/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/2EditDatabase/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/2EditDatabase/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/2EditDatabase/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/2EditDatabase/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/2EditDatabase/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/2EditDatabase/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/2EditDatabase/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/2EditDatabase/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/2EditDatabase/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/2EditDatabase/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/2EditDatabase/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/2EditDatabase/types/servers/ConfigServer.d.ts b/TypeScript/2EditDatabase/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/2EditDatabase/types/servers/ConfigServer.d.ts +++ b/TypeScript/2EditDatabase/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/2EditDatabase/types/servers/DatabaseServer.d.ts b/TypeScript/2EditDatabase/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/2EditDatabase/types/servers/DatabaseServer.d.ts +++ b/TypeScript/2EditDatabase/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/2EditDatabase/types/servers/HttpServer.d.ts b/TypeScript/2EditDatabase/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/2EditDatabase/types/servers/HttpServer.d.ts +++ b/TypeScript/2EditDatabase/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/2EditDatabase/types/servers/RagfairServer.d.ts b/TypeScript/2EditDatabase/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/2EditDatabase/types/servers/RagfairServer.d.ts +++ b/TypeScript/2EditDatabase/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts b/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts +++ b/TypeScript/2EditDatabase/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/2EditDatabase/types/services/FenceService.d.ts b/TypeScript/2EditDatabase/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/2EditDatabase/types/services/FenceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/2EditDatabase/types/services/HashCacheService.d.ts b/TypeScript/2EditDatabase/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/2EditDatabase/types/services/HashCacheService.d.ts +++ b/TypeScript/2EditDatabase/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/2EditDatabase/types/services/MatchLocationService.d.ts b/TypeScript/2EditDatabase/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/2EditDatabase/types/services/MatchLocationService.d.ts +++ b/TypeScript/2EditDatabase/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/2EditDatabase/types/services/ModCompilerService.d.ts b/TypeScript/2EditDatabase/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/2EditDatabase/types/services/ModCompilerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/2EditDatabase/types/services/NotificationService.d.ts b/TypeScript/2EditDatabase/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/2EditDatabase/types/services/NotificationService.d.ts +++ b/TypeScript/2EditDatabase/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/2EditDatabase/types/services/PaymentService.d.ts b/TypeScript/2EditDatabase/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/2EditDatabase/types/services/PaymentService.d.ts +++ b/TypeScript/2EditDatabase/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/2EditDatabase/types/services/PlayerService.d.ts b/TypeScript/2EditDatabase/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/2EditDatabase/types/services/PlayerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/2EditDatabase/types/services/RagfairCategoriesService.d.ts b/TypeScript/2EditDatabase/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/2EditDatabase/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/2EditDatabase/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/2EditDatabase/types/services/RagfairLinkedItemService.d.ts b/TypeScript/2EditDatabase/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/2EditDatabase/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/2EditDatabase/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/2EditDatabase/types/services/RagfairOfferService.d.ts b/TypeScript/2EditDatabase/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/2EditDatabase/types/services/RagfairOfferService.d.ts +++ b/TypeScript/2EditDatabase/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/2EditDatabase/types/services/RagfairPriceService.d.ts b/TypeScript/2EditDatabase/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/2EditDatabase/types/services/RagfairPriceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/2EditDatabase/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/2EditDatabase/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/2EditDatabase/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/2EditDatabase/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/2EditDatabase/types/services/TraderAssortService.d.ts b/TypeScript/2EditDatabase/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/2EditDatabase/types/services/TraderAssortService.d.ts +++ b/TypeScript/2EditDatabase/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/2EditDatabase/types/services/mod/image/imageRouteService.d.ts b/TypeScript/2EditDatabase/types/services/mod/image/imageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/2EditDatabase/types/services/mod/image/imageRouteService.d.ts +++ b/TypeScript/2EditDatabase/types/services/mod/image/imageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/2EditDatabase/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/2EditDatabase/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/2EditDatabase/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/2EditDatabase/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/2EditDatabase/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/2EditDatabase/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/2EditDatabase/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/2EditDatabase/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/2EditDatabase/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/2EditDatabase/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/2EditDatabase/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/2EditDatabase/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/2EditDatabase/types/utils/App.d.ts b/TypeScript/2EditDatabase/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/2EditDatabase/types/utils/App.d.ts +++ b/TypeScript/2EditDatabase/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/2EditDatabase/types/utils/AyncQueue.d.ts b/TypeScript/2EditDatabase/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/2EditDatabase/types/utils/AyncQueue.d.ts +++ b/TypeScript/2EditDatabase/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/2EditDatabase/types/utils/DatabaseImporter.d.ts b/TypeScript/2EditDatabase/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/2EditDatabase/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/2EditDatabase/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/2EditDatabase/types/utils/HashUtil.d.ts b/TypeScript/2EditDatabase/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/2EditDatabase/types/utils/HashUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/2EditDatabase/types/utils/HttpResponseUtil.d.ts b/TypeScript/2EditDatabase/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/2EditDatabase/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts b/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/2EditDatabase/types/utils/Logger.d.ts b/TypeScript/2EditDatabase/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/2EditDatabase/types/utils/Logger.d.ts +++ b/TypeScript/2EditDatabase/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/2EditDatabase/types/utils/ObjectId.d.ts b/TypeScript/2EditDatabase/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/2EditDatabase/types/utils/ObjectId.d.ts +++ b/TypeScript/2EditDatabase/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/2EditDatabase/types/utils/RandomUtil.d.ts b/TypeScript/2EditDatabase/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/2EditDatabase/types/utils/RandomUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/2EditDatabase/types/utils/VFS.d.ts b/TypeScript/2EditDatabase/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/2EditDatabase/types/utils/VFS.d.ts +++ b/TypeScript/2EditDatabase/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/2EditDatabase/types/utils/Watermark.d.ts b/TypeScript/2EditDatabase/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/2EditDatabase/types/utils/Watermark.d.ts +++ b/TypeScript/2EditDatabase/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; } diff --git a/TypeScript/3.0GetSptConfigFile/types/Utils.d.ts b/TypeScript/3.0GetSptConfigFile/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/BotCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/BundleCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/DataCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/GameCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/HealthCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/HttpCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/LocationCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/ModCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/NoteCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/PresetCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/QuestCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/RepairCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/SaveCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/TradeCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/TraderCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/3.0GetSptConfigFile/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/3.0GetSptConfigFile/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/3.0GetSptConfigFile/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/BotController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/CustomizationController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/CustomizationController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/DialogueController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/DialogueController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/GameController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/HandbookController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/HandbookController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/HealthController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/HealthController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/InraidController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/LauncherController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/LauncherController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/LocationController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/LocationController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/MatchController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/NoteController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/NoteController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/NotifierController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/NotifierController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/PresetBuildController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/PresetController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/PresetController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/ProfileController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/ProfileController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/QuestController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/QuestController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/RagfairController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/RagfairController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/RepairController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/RepairController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/TradeController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/TradeController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/TraderController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/TraderController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/WeatherController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/WeatherController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/3.0GetSptConfigFile/types/controllers/WishlistController.d.ts b/TypeScript/3.0GetSptConfigFile/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/3.0GetSptConfigFile/types/controllers/WishlistController.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/3.0GetSptConfigFile/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/3.0GetSptConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/3.0GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts b/TypeScript/3.0GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/3.0GetSptConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/3.0GetSptConfigFile/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/3.0GetSptConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/3.0GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/3.0GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/3.0GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/generators/LocationGenerator.d.ts b/TypeScript/3.0GetSptConfigFile/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/generators/LocationGenerator.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/3.0GetSptConfigFile/types/generators/PMCLootGenerator.d.ts b/TypeScript/3.0GetSptConfigFile/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/3.0GetSptConfigFile/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/3.0GetSptConfigFile/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/3.0GetSptConfigFile/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/3.0GetSptConfigFile/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/3.0GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/3.0GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/3.0GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/3.0GetSptConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/3.0GetSptConfigFile/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/3.0GetSptConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/AssortHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/AssortHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/BotHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/BotHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/ContainerHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/DialogueHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/GameEventHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/GameHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/HandbookHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/HttpServerHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/NotifierHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/PresetHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/PresetHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/ProbabilityHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/ProfileHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/QuestConditionHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairSellHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairServerHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairSortHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/RepairHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/RepairHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/SecureContainerHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/TradeHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/TradeHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/TraderAssortHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/3.0GetSptConfigFile/types/helpers/TraderHelper.d.ts b/TypeScript/3.0GetSptConfigFile/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/3.0GetSptConfigFile/types/helpers/TraderHelper.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/3.0GetSptConfigFile/types/loaders/BundleLoader.d.ts b/TypeScript/3.0GetSptConfigFile/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/3.0GetSptConfigFile/types/loaders/BundleLoader.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/3.0GetSptConfigFile/types/loaders/DelayedModLoader.d.ts b/TypeScript/3.0GetSptConfigFile/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/3.0GetSptConfigFile/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/loaders/InitialModLoader.d.ts b/TypeScript/3.0GetSptConfigFile/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/3.0GetSptConfigFile/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/3.0GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/3.0GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/3.0GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/3.0GetSptConfigFile/types/models/enums/QuestStatus.d.ts b/TypeScript/3.0GetSptConfigFile/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/3.0GetSptConfigFile/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/3.0GetSptConfigFile/types/models/spt/mod/IModLoader.d.ts b/TypeScript/3.0GetSptConfigFile/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/3.0GetSptConfigFile/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/3.0GetSptConfigFile/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/3.0GetSptConfigFile/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/3.0GetSptConfigFile/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/HttpRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/HttpRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/ImageRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/ImageRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/ItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/BotStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/DataStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/GameStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/3.0GetSptConfigFile/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/3.0GetSptConfigFile/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/3.0GetSptConfigFile/types/servers/ConfigServer.d.ts b/TypeScript/3.0GetSptConfigFile/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/3.0GetSptConfigFile/types/servers/ConfigServer.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/3.0GetSptConfigFile/types/servers/DatabaseServer.d.ts b/TypeScript/3.0GetSptConfigFile/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/3.0GetSptConfigFile/types/servers/DatabaseServer.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/servers/HttpServer.d.ts b/TypeScript/3.0GetSptConfigFile/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/3.0GetSptConfigFile/types/servers/HttpServer.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/servers/RagfairServer.d.ts b/TypeScript/3.0GetSptConfigFile/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/servers/RagfairServer.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/servers/SaveServer.d.ts b/TypeScript/3.0GetSptConfigFile/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/3.0GetSptConfigFile/types/servers/SaveServer.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/services/FenceService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/services/HashCacheService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/HashCacheService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/3.0GetSptConfigFile/types/services/InsuranceService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/3.0GetSptConfigFile/types/services/MatchLocationService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/MatchLocationService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/services/ModCompilerService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/ModCompilerService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/3.0GetSptConfigFile/types/services/NotificationService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/NotificationService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/services/PaymentService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/PaymentService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/3.0GetSptConfigFile/types/services/PlayerService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/PlayerService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/3.0GetSptConfigFile/types/services/RagfairCategoriesService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/services/RagfairLinkedItemService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/3.0GetSptConfigFile/types/services/RagfairOfferService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/RagfairOfferService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/3.0GetSptConfigFile/types/services/RagfairPriceService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/RagfairPriceService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/3.0GetSptConfigFile/types/services/TraderAssortService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/TraderAssortService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/services/mod/image/imageRouteService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/mod/image/imageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/mod/image/imageRouteService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/mod/image/imageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/3.0GetSptConfigFile/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/3.0GetSptConfigFile/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/3.0GetSptConfigFile/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/utils/App.d.ts b/TypeScript/3.0GetSptConfigFile/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/3.0GetSptConfigFile/types/utils/App.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/3.0GetSptConfigFile/types/utils/AyncQueue.d.ts b/TypeScript/3.0GetSptConfigFile/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/3.0GetSptConfigFile/types/utils/AyncQueue.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/3.0GetSptConfigFile/types/utils/DatabaseImporter.d.ts b/TypeScript/3.0GetSptConfigFile/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/3.0GetSptConfigFile/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/utils/HashUtil.d.ts b/TypeScript/3.0GetSptConfigFile/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/3.0GetSptConfigFile/types/utils/HashUtil.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/utils/HttpResponseUtil.d.ts b/TypeScript/3.0GetSptConfigFile/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/3.0GetSptConfigFile/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/utils/JsonUtil.d.ts b/TypeScript/3.0GetSptConfigFile/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/3.0GetSptConfigFile/types/utils/JsonUtil.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/3.0GetSptConfigFile/types/utils/Logger.d.ts b/TypeScript/3.0GetSptConfigFile/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/3.0GetSptConfigFile/types/utils/Logger.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/3.0GetSptConfigFile/types/utils/ObjectId.d.ts b/TypeScript/3.0GetSptConfigFile/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/3.0GetSptConfigFile/types/utils/ObjectId.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/3.0GetSptConfigFile/types/utils/RandomUtil.d.ts b/TypeScript/3.0GetSptConfigFile/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/3.0GetSptConfigFile/types/utils/RandomUtil.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/3.0GetSptConfigFile/types/utils/VFS.d.ts b/TypeScript/3.0GetSptConfigFile/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/3.0GetSptConfigFile/types/utils/VFS.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/3.0GetSptConfigFile/types/utils/Watermark.d.ts b/TypeScript/3.0GetSptConfigFile/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/3.0GetSptConfigFile/types/utils/Watermark.d.ts +++ b/TypeScript/3.0GetSptConfigFile/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/Utils.d.ts b/TypeScript/4UseACustomConfigFile/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/BundleCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/HealthCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/HttpCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/ModCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/NoteCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/PresetCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/QuestCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/RepairCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/SaveCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/TradeCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HandbookController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HandbookController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/NoteController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/NoteController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/NotifierController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/NotifierController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/PresetBuildController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/PresetController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/PresetController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/ProfileController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/ProfileController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/RepairController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/RepairController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/WishlistController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/WishlistController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/PMCLootGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/AssortHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/AssortHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ContainerHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/GameEventHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/GameHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HttpServerHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ProbabilityHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/QuestConditionHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSellHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSortHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/SecureContainerHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/TraderAssortHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts b/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/4UseACustomConfigFile/types/loaders/DelayedModLoader.d.ts b/TypeScript/4UseACustomConfigFile/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/4UseACustomConfigFile/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/loaders/InitialModLoader.d.ts b/TypeScript/4UseACustomConfigFile/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/4UseACustomConfigFile/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/QuestStatus.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/mod/IModLoader.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/HttpRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/HttpRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/ImageRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/ImageRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/BotStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/DataStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/GameStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/4UseACustomConfigFile/types/servers/ConfigServer.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/ConfigServer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/4UseACustomConfigFile/types/servers/DatabaseServer.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/DatabaseServer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/servers/HttpServer.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/HttpServer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/servers/RagfairServer.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/RagfairServer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/4UseACustomConfigFile/types/services/HashCacheService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/HashCacheService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/MatchLocationService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/MatchLocationService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/4UseACustomConfigFile/types/services/ModCompilerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ModCompilerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/NotificationService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/NotificationService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/PlayerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/PlayerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/4UseACustomConfigFile/types/services/RagfairCategoriesService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/4UseACustomConfigFile/types/services/RagfairLinkedItemService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/RagfairOfferService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/RagfairOfferService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/4UseACustomConfigFile/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/4UseACustomConfigFile/types/services/TraderAssortService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/TraderAssortService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/mod/image/imageRouteService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/mod/image/imageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/mod/image/imageRouteService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/mod/image/imageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/utils/App.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/App.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/utils/AyncQueue.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/AyncQueue.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/4UseACustomConfigFile/types/utils/HashUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/HashUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/4UseACustomConfigFile/types/utils/HttpResponseUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/4UseACustomConfigFile/types/utils/Logger.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/Logger.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/4UseACustomConfigFile/types/utils/ObjectId.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/ObjectId.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/4UseACustomConfigFile/types/utils/RandomUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/RandomUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/4UseACustomConfigFile/types/utils/Watermark.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/Watermark.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; } diff --git a/TypeScript/5ReplaceMethod/types/Utils.d.ts b/TypeScript/5ReplaceMethod/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/BundleCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/HealthCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/HttpCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/ModCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/NoteCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/PresetCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/QuestCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/RepairCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/SaveCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/TradeCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/CustomizationController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/CustomizationController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/HandbookController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/HandbookController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/5ReplaceMethod/types/controllers/NoteController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/NoteController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/controllers/NotifierController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/NotifierController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/5ReplaceMethod/types/controllers/PresetBuildController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/controllers/PresetController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/PresetController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/ProfileController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/ProfileController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/5ReplaceMethod/types/controllers/RepairController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/RepairController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/WishlistController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/WishlistController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/5ReplaceMethod/types/generators/PMCLootGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/5ReplaceMethod/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/AssortHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/AssortHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/5ReplaceMethod/types/helpers/ContainerHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/5ReplaceMethod/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/GameEventHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/5ReplaceMethod/types/helpers/GameHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/5ReplaceMethod/types/helpers/HttpServerHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/5ReplaceMethod/types/helpers/ProbabilityHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/QuestConditionHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairSellHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairSortHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/SecureContainerHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/TraderAssortHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts b/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts +++ b/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/5ReplaceMethod/types/loaders/DelayedModLoader.d.ts b/TypeScript/5ReplaceMethod/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/5ReplaceMethod/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/5ReplaceMethod/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/5ReplaceMethod/types/loaders/InitialModLoader.d.ts b/TypeScript/5ReplaceMethod/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/5ReplaceMethod/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/5ReplaceMethod/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/5ReplaceMethod/types/models/enums/QuestStatus.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/mod/IModLoader.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/5ReplaceMethod/types/routers/HttpRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/5ReplaceMethod/types/routers/HttpRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/5ReplaceMethod/types/routers/ImageRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/5ReplaceMethod/types/routers/ImageRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/5ReplaceMethod/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/5ReplaceMethod/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/5ReplaceMethod/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/5ReplaceMethod/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/5ReplaceMethod/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/5ReplaceMethod/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/5ReplaceMethod/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/5ReplaceMethod/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/5ReplaceMethod/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/5ReplaceMethod/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/5ReplaceMethod/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/5ReplaceMethod/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/5ReplaceMethod/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/5ReplaceMethod/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/5ReplaceMethod/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/5ReplaceMethod/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/5ReplaceMethod/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/5ReplaceMethod/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/5ReplaceMethod/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/5ReplaceMethod/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/5ReplaceMethod/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/BotStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/DataStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/GameStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/5ReplaceMethod/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/5ReplaceMethod/types/servers/ConfigServer.d.ts b/TypeScript/5ReplaceMethod/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/5ReplaceMethod/types/servers/ConfigServer.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/5ReplaceMethod/types/servers/DatabaseServer.d.ts b/TypeScript/5ReplaceMethod/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/5ReplaceMethod/types/servers/DatabaseServer.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/5ReplaceMethod/types/servers/HttpServer.d.ts b/TypeScript/5ReplaceMethod/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/5ReplaceMethod/types/servers/HttpServer.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/5ReplaceMethod/types/servers/RagfairServer.d.ts b/TypeScript/5ReplaceMethod/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/5ReplaceMethod/types/servers/RagfairServer.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts b/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts b/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/5ReplaceMethod/types/services/HashCacheService.d.ts b/TypeScript/5ReplaceMethod/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/5ReplaceMethod/types/services/HashCacheService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/5ReplaceMethod/types/services/MatchLocationService.d.ts b/TypeScript/5ReplaceMethod/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/5ReplaceMethod/types/services/MatchLocationService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/5ReplaceMethod/types/services/ModCompilerService.d.ts b/TypeScript/5ReplaceMethod/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/5ReplaceMethod/types/services/ModCompilerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/services/NotificationService.d.ts b/TypeScript/5ReplaceMethod/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/5ReplaceMethod/types/services/NotificationService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts b/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/5ReplaceMethod/types/services/PlayerService.d.ts b/TypeScript/5ReplaceMethod/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/5ReplaceMethod/types/services/PlayerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/5ReplaceMethod/types/services/RagfairCategoriesService.d.ts b/TypeScript/5ReplaceMethod/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/5ReplaceMethod/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/5ReplaceMethod/types/services/RagfairLinkedItemService.d.ts b/TypeScript/5ReplaceMethod/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/5ReplaceMethod/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/5ReplaceMethod/types/services/RagfairOfferService.d.ts b/TypeScript/5ReplaceMethod/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/5ReplaceMethod/types/services/RagfairOfferService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts b/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/5ReplaceMethod/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/5ReplaceMethod/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/5ReplaceMethod/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/5ReplaceMethod/types/services/TraderAssortService.d.ts b/TypeScript/5ReplaceMethod/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/5ReplaceMethod/types/services/TraderAssortService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/5ReplaceMethod/types/services/mod/image/imageRouteService.d.ts b/TypeScript/5ReplaceMethod/types/services/mod/image/imageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/5ReplaceMethod/types/services/mod/image/imageRouteService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/mod/image/imageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/5ReplaceMethod/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/5ReplaceMethod/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/5ReplaceMethod/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/5ReplaceMethod/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/5ReplaceMethod/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/5ReplaceMethod/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/5ReplaceMethod/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/5ReplaceMethod/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/5ReplaceMethod/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/5ReplaceMethod/types/utils/App.d.ts b/TypeScript/5ReplaceMethod/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/5ReplaceMethod/types/utils/App.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/5ReplaceMethod/types/utils/AyncQueue.d.ts b/TypeScript/5ReplaceMethod/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/5ReplaceMethod/types/utils/AyncQueue.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts b/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/5ReplaceMethod/types/utils/HashUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/5ReplaceMethod/types/utils/HashUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/5ReplaceMethod/types/utils/HttpResponseUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/5ReplaceMethod/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/5ReplaceMethod/types/utils/Logger.d.ts b/TypeScript/5ReplaceMethod/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/5ReplaceMethod/types/utils/Logger.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/5ReplaceMethod/types/utils/ObjectId.d.ts b/TypeScript/5ReplaceMethod/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/5ReplaceMethod/types/utils/ObjectId.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/5ReplaceMethod/types/utils/RandomUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/5ReplaceMethod/types/utils/RandomUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts b/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/5ReplaceMethod/types/utils/Watermark.d.ts b/TypeScript/5ReplaceMethod/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/5ReplaceMethod/types/utils/Watermark.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/Utils.d.ts b/TypeScript/6ReferenceAnotherClass/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/BundleCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/HealthCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/HttpCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/ModCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/NoteCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/QuestCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/RepairCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/SaveCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/TradeCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/CustomizationController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/CustomizationController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/HandbookController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/HandbookController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/NoteController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/NoteController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/NotifierController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/NotifierController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/PresetBuildController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/PresetController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/PresetController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/ProfileController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/ProfileController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/RepairController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/RepairController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/WishlistController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/WishlistController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/PMCLootGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/AssortHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/AssortHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ContainerHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/GameEventHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/GameHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HttpServerHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ProbabilityHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestConditionHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairSellHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairSortHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/SecureContainerHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/TraderAssortHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts b/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/6ReferenceAnotherClass/types/loaders/DelayedModLoader.d.ts b/TypeScript/6ReferenceAnotherClass/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/6ReferenceAnotherClass/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/loaders/InitialModLoader.d.ts b/TypeScript/6ReferenceAnotherClass/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/6ReferenceAnotherClass/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestStatus.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/IModLoader.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/HttpRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/HttpRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/ImageRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/ImageRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/BotStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/DataStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/GameStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/ConfigServer.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/ConfigServer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/DatabaseServer.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/DatabaseServer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/HttpServer.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/HttpServer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/RagfairServer.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/RagfairServer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/HashCacheService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/HashCacheService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/MatchLocationService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/MatchLocationService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ModCompilerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ModCompilerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/NotificationService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/NotificationService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/PlayerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/PlayerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RagfairCategoriesService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RagfairLinkedItemService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RagfairOfferService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/RagfairOfferService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/TraderAssortService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/TraderAssortService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/mod/image/imageRouteService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/mod/image/imageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/mod/image/imageRouteService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/mod/image/imageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/App.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/App.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/AyncQueue.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/AyncQueue.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/HashUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/HashUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/HttpResponseUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/Logger.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/Logger.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/ObjectId.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/ObjectId.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/Watermark.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/Watermark.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; } diff --git a/TypeScript/7OnLoadHook/types/Utils.d.ts b/TypeScript/7OnLoadHook/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/BundleCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/7OnLoadHook/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/HealthCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/callbacks/HttpCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/7OnLoadHook/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/7OnLoadHook/types/callbacks/ModCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/NoteCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/7OnLoadHook/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/callbacks/PresetCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/7OnLoadHook/types/callbacks/QuestCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/RepairCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/callbacks/SaveCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/TradeCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/7OnLoadHook/types/controllers/CustomizationController.d.ts b/TypeScript/7OnLoadHook/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/7OnLoadHook/types/controllers/CustomizationController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts b/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/7OnLoadHook/types/controllers/HandbookController.d.ts b/TypeScript/7OnLoadHook/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/7OnLoadHook/types/controllers/HandbookController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts b/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts b/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts b/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts b/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/7OnLoadHook/types/controllers/NoteController.d.ts b/TypeScript/7OnLoadHook/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/7OnLoadHook/types/controllers/NoteController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/controllers/NotifierController.d.ts b/TypeScript/7OnLoadHook/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/7OnLoadHook/types/controllers/NotifierController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/7OnLoadHook/types/controllers/PresetBuildController.d.ts b/TypeScript/7OnLoadHook/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/7OnLoadHook/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/controllers/PresetController.d.ts b/TypeScript/7OnLoadHook/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/7OnLoadHook/types/controllers/PresetController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/7OnLoadHook/types/controllers/ProfileController.d.ts b/TypeScript/7OnLoadHook/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/7OnLoadHook/types/controllers/ProfileController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts b/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts b/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/7OnLoadHook/types/controllers/RepairController.d.ts b/TypeScript/7OnLoadHook/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/7OnLoadHook/types/controllers/RepairController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts b/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts b/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts b/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/7OnLoadHook/types/controllers/WishlistController.d.ts b/TypeScript/7OnLoadHook/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/7OnLoadHook/types/controllers/WishlistController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/7OnLoadHook/types/generators/PMCLootGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/7OnLoadHook/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/7OnLoadHook/types/helpers/AssortHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/7OnLoadHook/types/helpers/AssortHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/7OnLoadHook/types/helpers/ContainerHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/7OnLoadHook/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/7OnLoadHook/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/7OnLoadHook/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/7OnLoadHook/types/helpers/GameEventHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/7OnLoadHook/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/7OnLoadHook/types/helpers/GameHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/7OnLoadHook/types/helpers/HttpServerHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/7OnLoadHook/types/helpers/ProbabilityHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/7OnLoadHook/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/7OnLoadHook/types/helpers/QuestConditionHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/7OnLoadHook/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairSellHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairSortHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/7OnLoadHook/types/helpers/SecureContainerHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/7OnLoadHook/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/7OnLoadHook/types/helpers/TraderAssortHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/7OnLoadHook/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts b/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts +++ b/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/7OnLoadHook/types/loaders/DelayedModLoader.d.ts b/TypeScript/7OnLoadHook/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/7OnLoadHook/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/7OnLoadHook/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/7OnLoadHook/types/loaders/InitialModLoader.d.ts b/TypeScript/7OnLoadHook/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/7OnLoadHook/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/7OnLoadHook/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/7OnLoadHook/types/models/enums/QuestStatus.d.ts b/TypeScript/7OnLoadHook/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/mod/IModLoader.d.ts b/TypeScript/7OnLoadHook/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/7OnLoadHook/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/7OnLoadHook/types/routers/HttpRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/7OnLoadHook/types/routers/HttpRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/7OnLoadHook/types/routers/ImageRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/7OnLoadHook/types/routers/ImageRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/7OnLoadHook/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/7OnLoadHook/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/7OnLoadHook/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/7OnLoadHook/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/7OnLoadHook/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/7OnLoadHook/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/7OnLoadHook/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/7OnLoadHook/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/7OnLoadHook/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/7OnLoadHook/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/7OnLoadHook/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/7OnLoadHook/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/7OnLoadHook/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/7OnLoadHook/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/7OnLoadHook/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/7OnLoadHook/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/7OnLoadHook/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/7OnLoadHook/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/7OnLoadHook/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/7OnLoadHook/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/7OnLoadHook/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/7OnLoadHook/types/routers/static/BotStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/DataStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/GameStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/7OnLoadHook/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/7OnLoadHook/types/servers/ConfigServer.d.ts b/TypeScript/7OnLoadHook/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/7OnLoadHook/types/servers/ConfigServer.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/7OnLoadHook/types/servers/DatabaseServer.d.ts b/TypeScript/7OnLoadHook/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/7OnLoadHook/types/servers/DatabaseServer.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/7OnLoadHook/types/servers/HttpServer.d.ts b/TypeScript/7OnLoadHook/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/7OnLoadHook/types/servers/HttpServer.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/7OnLoadHook/types/servers/RagfairServer.d.ts b/TypeScript/7OnLoadHook/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/7OnLoadHook/types/servers/RagfairServer.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts b/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/7OnLoadHook/types/services/FenceService.d.ts b/TypeScript/7OnLoadHook/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/7OnLoadHook/types/services/FenceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/7OnLoadHook/types/services/HashCacheService.d.ts b/TypeScript/7OnLoadHook/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/7OnLoadHook/types/services/HashCacheService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/7OnLoadHook/types/services/MatchLocationService.d.ts b/TypeScript/7OnLoadHook/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/7OnLoadHook/types/services/MatchLocationService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/7OnLoadHook/types/services/ModCompilerService.d.ts b/TypeScript/7OnLoadHook/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/7OnLoadHook/types/services/ModCompilerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/7OnLoadHook/types/services/NotificationService.d.ts b/TypeScript/7OnLoadHook/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/7OnLoadHook/types/services/NotificationService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts b/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/7OnLoadHook/types/services/PlayerService.d.ts b/TypeScript/7OnLoadHook/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/7OnLoadHook/types/services/PlayerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/7OnLoadHook/types/services/RagfairCategoriesService.d.ts b/TypeScript/7OnLoadHook/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/7OnLoadHook/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/7OnLoadHook/types/services/RagfairLinkedItemService.d.ts b/TypeScript/7OnLoadHook/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/7OnLoadHook/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/7OnLoadHook/types/services/RagfairOfferService.d.ts b/TypeScript/7OnLoadHook/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/7OnLoadHook/types/services/RagfairOfferService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts b/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/7OnLoadHook/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/7OnLoadHook/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/7OnLoadHook/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/7OnLoadHook/types/services/TraderAssortService.d.ts b/TypeScript/7OnLoadHook/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/7OnLoadHook/types/services/TraderAssortService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/7OnLoadHook/types/services/mod/image/imageRouteService.d.ts b/TypeScript/7OnLoadHook/types/services/mod/image/imageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/7OnLoadHook/types/services/mod/image/imageRouteService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/mod/image/imageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/7OnLoadHook/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/7OnLoadHook/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/7OnLoadHook/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/7OnLoadHook/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/7OnLoadHook/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/7OnLoadHook/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/7OnLoadHook/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/7OnLoadHook/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/7OnLoadHook/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/7OnLoadHook/types/utils/App.d.ts b/TypeScript/7OnLoadHook/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/7OnLoadHook/types/utils/App.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/7OnLoadHook/types/utils/AyncQueue.d.ts b/TypeScript/7OnLoadHook/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/7OnLoadHook/types/utils/AyncQueue.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts b/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/7OnLoadHook/types/utils/HashUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/7OnLoadHook/types/utils/HashUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/7OnLoadHook/types/utils/HttpResponseUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/7OnLoadHook/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/7OnLoadHook/types/utils/Logger.d.ts b/TypeScript/7OnLoadHook/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/7OnLoadHook/types/utils/Logger.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/7OnLoadHook/types/utils/ObjectId.d.ts b/TypeScript/7OnLoadHook/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/7OnLoadHook/types/utils/ObjectId.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/7OnLoadHook/types/utils/RandomUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/7OnLoadHook/types/utils/RandomUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/7OnLoadHook/types/utils/VFS.d.ts b/TypeScript/7OnLoadHook/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/7OnLoadHook/types/utils/VFS.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/7OnLoadHook/types/utils/Watermark.d.ts b/TypeScript/7OnLoadHook/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/7OnLoadHook/types/utils/Watermark.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; } diff --git a/TypeScript/8OnUpdateHook/types/Utils.d.ts b/TypeScript/8OnUpdateHook/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/BundleCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/HealthCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/HttpCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/ModCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/NoteCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/PresetCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/QuestCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/RepairCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/SaveCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/TradeCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/CustomizationController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/CustomizationController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/HandbookController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/HandbookController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/8OnUpdateHook/types/controllers/NoteController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/NoteController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/controllers/NotifierController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/NotifierController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/8OnUpdateHook/types/controllers/PresetBuildController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/controllers/PresetController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/PresetController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/ProfileController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/ProfileController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/8OnUpdateHook/types/controllers/RepairController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/RepairController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/WishlistController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/WishlistController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/8OnUpdateHook/types/generators/PMCLootGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/8OnUpdateHook/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/AssortHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/AssortHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/8OnUpdateHook/types/helpers/ContainerHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/8OnUpdateHook/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/GameEventHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/8OnUpdateHook/types/helpers/GameHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/8OnUpdateHook/types/helpers/HttpServerHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/8OnUpdateHook/types/helpers/ProbabilityHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/QuestConditionHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairSellHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairSortHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/SecureContainerHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/TraderAssortHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts b/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts +++ b/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/8OnUpdateHook/types/loaders/DelayedModLoader.d.ts b/TypeScript/8OnUpdateHook/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/8OnUpdateHook/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/8OnUpdateHook/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/8OnUpdateHook/types/loaders/InitialModLoader.d.ts b/TypeScript/8OnUpdateHook/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/8OnUpdateHook/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/8OnUpdateHook/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/8OnUpdateHook/types/models/enums/QuestStatus.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/mod/IModLoader.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/8OnUpdateHook/types/routers/HttpRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/8OnUpdateHook/types/routers/HttpRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/8OnUpdateHook/types/routers/ImageRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/8OnUpdateHook/types/routers/ImageRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/8OnUpdateHook/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/8OnUpdateHook/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/8OnUpdateHook/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/8OnUpdateHook/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/8OnUpdateHook/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/8OnUpdateHook/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/8OnUpdateHook/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/8OnUpdateHook/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/8OnUpdateHook/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/8OnUpdateHook/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/8OnUpdateHook/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/8OnUpdateHook/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/8OnUpdateHook/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/8OnUpdateHook/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/8OnUpdateHook/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/8OnUpdateHook/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/8OnUpdateHook/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/8OnUpdateHook/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/8OnUpdateHook/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/8OnUpdateHook/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/8OnUpdateHook/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/BotStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/DataStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/GameStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/8OnUpdateHook/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/8OnUpdateHook/types/servers/ConfigServer.d.ts b/TypeScript/8OnUpdateHook/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/8OnUpdateHook/types/servers/ConfigServer.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/8OnUpdateHook/types/servers/DatabaseServer.d.ts b/TypeScript/8OnUpdateHook/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/8OnUpdateHook/types/servers/DatabaseServer.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/8OnUpdateHook/types/servers/HttpServer.d.ts b/TypeScript/8OnUpdateHook/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/8OnUpdateHook/types/servers/HttpServer.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/8OnUpdateHook/types/servers/RagfairServer.d.ts b/TypeScript/8OnUpdateHook/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/8OnUpdateHook/types/servers/RagfairServer.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts b/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts b/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/8OnUpdateHook/types/services/HashCacheService.d.ts b/TypeScript/8OnUpdateHook/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/8OnUpdateHook/types/services/HashCacheService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/8OnUpdateHook/types/services/MatchLocationService.d.ts b/TypeScript/8OnUpdateHook/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/8OnUpdateHook/types/services/MatchLocationService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/8OnUpdateHook/types/services/ModCompilerService.d.ts b/TypeScript/8OnUpdateHook/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/8OnUpdateHook/types/services/ModCompilerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/services/NotificationService.d.ts b/TypeScript/8OnUpdateHook/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/8OnUpdateHook/types/services/NotificationService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts b/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/8OnUpdateHook/types/services/PlayerService.d.ts b/TypeScript/8OnUpdateHook/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/8OnUpdateHook/types/services/PlayerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/8OnUpdateHook/types/services/RagfairCategoriesService.d.ts b/TypeScript/8OnUpdateHook/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/8OnUpdateHook/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/8OnUpdateHook/types/services/RagfairLinkedItemService.d.ts b/TypeScript/8OnUpdateHook/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/8OnUpdateHook/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/8OnUpdateHook/types/services/RagfairOfferService.d.ts b/TypeScript/8OnUpdateHook/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/8OnUpdateHook/types/services/RagfairOfferService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts b/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/8OnUpdateHook/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/8OnUpdateHook/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/8OnUpdateHook/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/8OnUpdateHook/types/services/TraderAssortService.d.ts b/TypeScript/8OnUpdateHook/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/8OnUpdateHook/types/services/TraderAssortService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/8OnUpdateHook/types/services/mod/image/imageRouteService.d.ts b/TypeScript/8OnUpdateHook/types/services/mod/image/imageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/8OnUpdateHook/types/services/mod/image/imageRouteService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/mod/image/imageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/8OnUpdateHook/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/8OnUpdateHook/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/8OnUpdateHook/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/8OnUpdateHook/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/8OnUpdateHook/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/8OnUpdateHook/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/8OnUpdateHook/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/8OnUpdateHook/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/8OnUpdateHook/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/8OnUpdateHook/types/utils/App.d.ts b/TypeScript/8OnUpdateHook/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/8OnUpdateHook/types/utils/App.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/8OnUpdateHook/types/utils/AyncQueue.d.ts b/TypeScript/8OnUpdateHook/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/8OnUpdateHook/types/utils/AyncQueue.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts b/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/8OnUpdateHook/types/utils/HashUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/8OnUpdateHook/types/utils/HashUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/8OnUpdateHook/types/utils/HttpResponseUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/8OnUpdateHook/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/8OnUpdateHook/types/utils/Logger.d.ts b/TypeScript/8OnUpdateHook/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/8OnUpdateHook/types/utils/Logger.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/8OnUpdateHook/types/utils/ObjectId.d.ts b/TypeScript/8OnUpdateHook/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/8OnUpdateHook/types/utils/ObjectId.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/8OnUpdateHook/types/utils/RandomUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/8OnUpdateHook/types/utils/RandomUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts b/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/8OnUpdateHook/types/utils/Watermark.d.ts b/TypeScript/8OnUpdateHook/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/8OnUpdateHook/types/utils/Watermark.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; } diff --git a/TypeScript/9RouterHooks/types/Utils.d.ts b/TypeScript/9RouterHooks/types/Utils.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts index 9602975..2db60dc 100644 --- a/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BotCallbacks { - private botController; - private httpResponse; + protected botController: BotController; + protected httpResponse: HttpResponseUtil; constructor(botController: BotController, httpResponse: HttpResponseUtil); getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/9RouterHooks/types/callbacks/BundleCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/BundleCallbacks.d.ts index b007ab8..b28abe1 100644 --- a/TypeScript/9RouterHooks/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/BundleCallbacks.d.ts @@ -1,15 +1,16 @@ import { BundleLoader } from "../loaders/BundleLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class BundleCallbacks { - private logger; - private httpResponse; - private httpServer; - private bundleLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer); sendBundle(sessionID: string, req: any, resp: any, body: any): any; getBundles(url: string, info: any, sessionID: string): string; diff --git a/TypeScript/9RouterHooks/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/CustomizationCallbacks.d.ts index 918b8b6..3bab8c0 100644 --- a/TypeScript/9RouterHooks/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/CustomizationCallbacks.d.ts @@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class CustomizationCallbacks { - private customizationController; - private saveServer; - private httpResponse; + protected customizationController: CustomizationController; + protected saveServer: SaveServer; + protected httpResponse: HttpResponseUtil; constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil); getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{ _id: string; diff --git a/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts index 018420e..cfb1c16 100644 --- a/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts @@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DataCallbacks { - private httpResponse; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts index 3b6fbd1..634f90b 100644 --- a/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts @@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueCallbacks extends OnUpdate { - private hashUtil; - private timeUtil; - private httpResponse; - private dialogueController; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts index 44a30ea..d5cad76 100644 --- a/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts @@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData" import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class GameCallbacks { - private httpResponse; - private watermark; - private gameController; + protected httpResponse: HttpResponseUtil; + protected watermark: Watermark; + protected gameController: GameController; constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController); versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/9RouterHooks/types/callbacks/HandbookCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/HandbookCallbacks.d.ts index 0db5fec..891e375 100644 --- a/TypeScript/9RouterHooks/types/callbacks/HandbookCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/HandbookCallbacks.d.ts @@ -1,7 +1,7 @@ import { HandbookController } from "../controllers/HandbookController"; import { OnLoad } from "../di/OnLoad"; export declare class HandbookCallbacks extends OnLoad { - private handbookController; + protected handbookController: HandbookController; constructor(handbookController: HandbookController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/9RouterHooks/types/callbacks/HealthCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/HealthCallbacks.d.ts index a50dd42..8f7b89d 100644 --- a/TypeScript/9RouterHooks/types/callbacks/HealthCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/HealthCallbacks.d.ts @@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class HealthCallbacks { - private httpResponse; - private profileHelper; - private healthController; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected healthController: HealthController; constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/HideoutCallbacks.d.ts index 3698176..99ab4c9 100644 --- a/TypeScript/9RouterHooks/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/HideoutCallbacks.d.ts @@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HideoutCallbacks extends OnUpdate { - private hideoutController; - private configServer; - private hideoutConfig; + protected hideoutController: HideoutController; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(hideoutController: HideoutController, // TODO: delay needed configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/callbacks/HttpCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/HttpCallbacks.d.ts index 9fe387d..94c97bd 100644 --- a/TypeScript/9RouterHooks/types/callbacks/HttpCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/HttpCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoad } from "../di/OnLoad"; import { IHttpServer } from "../models/spt/server/IHttpServer"; export declare class HttpCallbacks extends OnLoad { - private httpServer; + protected httpServer: IHttpServer; constructor(httpServer: IHttpServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts index 2d53227..05bcce4 100644 --- a/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts @@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InraidCallbacks { - private inraidController; - private httpResponse; - private configServer; - private airdropConfig; - private inraidConfig; + protected inraidController: InraidController; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected airdropConfig: IAirdropConfig; + protected inraidConfig: IInRaidConfig; constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer); registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; diff --git a/TypeScript/9RouterHooks/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/InsuranceCallbacks.d.ts index 79feb67..520d0eb 100644 --- a/TypeScript/9RouterHooks/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/InsuranceCallbacks.d.ts @@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { InsuranceService } from "../services/InsuranceService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class InsuranceCallbacks extends OnLoadOnUpdate { - private insuranceController; - private insuranceService; - private httpResponse; - private configServer; - private insuranceConfig; + protected insuranceController: InsuranceController; + protected insuranceService: InsuranceService; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); onLoad(): void; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts index 9795aa0..9ab1486 100644 --- a/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts @@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class InventoryCallbacks { - private inventoryController; + protected inventoryController: InventoryController; constructor(inventoryController: InventoryController); moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/ItemEventCallbacks.d.ts index 74e79c4..f4f04f9 100644 --- a/TypeScript/9RouterHooks/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/ItemEventCallbacks.d.ts @@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class ItemEventCallbacks { - private httpResponse; - private itemEventRouter; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/9RouterHooks/types/callbacks/LauncherCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/LauncherCallbacks.d.ts index 4bd5e2c..c022325 100644 --- a/TypeScript/9RouterHooks/types/callbacks/LauncherCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/LauncherCallbacks.d.ts @@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { Watermark } from "../utils/Watermark"; declare class LauncherCallbacks { - private httpResponse; - private launcherController; - private saveServer; - private watermark; + protected httpResponse: HttpResponseUtil; + protected launcherController: LauncherController; + protected saveServer: SaveServer; + protected watermark: Watermark; constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark); connect(): string; login(url: string, info: ILoginRequestData, sessionID: string): string; diff --git a/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts index 5ecab74..cc69369 100644 --- a/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts @@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class LocationCallbacks { - private httpResponse; - private locationController; + protected httpResponse: HttpResponseUtil; + protected locationController: LocationController; constructor(httpResponse: HttpResponseUtil, locationController: LocationController); getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts index 63d38d9..083c1f5 100644 --- a/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts @@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class MatchCallbacks { - private httpResponse; - private jsonUtil; - private matchController; - private databaseServer; + protected httpResponse: HttpResponseUtil; + protected jsonUtil: JsonUtil; + protected matchController: MatchController; + protected databaseServer: DatabaseServer; constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); updatePing(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData; diff --git a/TypeScript/9RouterHooks/types/callbacks/ModCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/ModCallbacks.d.ts index 2011f0e..866abf7 100644 --- a/TypeScript/9RouterHooks/types/callbacks/ModCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/ModCallbacks.d.ts @@ -1,16 +1,17 @@ import { OnLoad } from "../di/OnLoad"; import { DelayedModLoader } from "../loaders/DelayedModLoader"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; declare class ModCallbacks extends OnLoad { - private logger; - private httpResponse; - private httpServer; - private modLoader; - private configServer; - private httpConfig; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected httpServer: IHttpServer; + protected modLoader: DelayedModLoader; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/9RouterHooks/types/callbacks/NoteCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/NoteCallbacks.d.ts index fd7c5ca..d39d400 100644 --- a/TypeScript/9RouterHooks/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/NoteCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { INoteActionData } from "../models/eft/notes/INoteActionData"; export declare class NoteCallbacks { - private noteController; + protected noteController: NoteController; constructor(noteController: NoteController); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/NotifierCallbacks.d.ts index 416e6a3..cd1e736 100644 --- a/TypeScript/9RouterHooks/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/NotifierCallbacks.d.ts @@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class NotifierCallbacks { - private httpServerHelper; - private httpResponse; - private notifierController; + protected httpServerHelper: HttpServerHelper; + protected httpResponse: HttpResponseUtil; + protected notifierController: NotifierController; constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController); /** * If we don't have anything to send, it's ok to not send anything back @@ -16,7 +16,7 @@ export declare class NotifierCallbacks { * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; + sendNotification(_sessionID: string, req: any, resp: any, _data: any): void; getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/9RouterHooks/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/PresetBuildCallbacks.d.ts index 639c33f..8a0c155 100644 --- a/TypeScript/9RouterHooks/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/PresetBuildCallbacks.d.ts @@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PresetBuildCallbacks { - private httpResponse; - private presetBuildController; + protected httpResponse: HttpResponseUtil; + protected presetBuildController: PresetBuildController; constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController); getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/callbacks/PresetCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/PresetCallbacks.d.ts index f62afd6..4553f8f 100644 --- a/TypeScript/9RouterHooks/types/callbacks/PresetCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/PresetCallbacks.d.ts @@ -1,7 +1,7 @@ import { PresetController } from "../controllers/PresetController"; import { OnLoad } from "../di/OnLoad"; export declare class PresetCallbacks extends OnLoad { - private presetController; + protected presetController: PresetController; constructor(presetController: PresetController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts index efce47d..116e7c5 100644 --- a/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts @@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileCallbacks { - private httpResponse; - private timeUtil; - private profileController; + protected httpResponse: HttpResponseUtil; + protected timeUtil: TimeUtil; + protected profileController: ProfileController; constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController); createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/9RouterHooks/types/callbacks/QuestCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/QuestCallbacks.d.ts index f742096..559c29e 100644 --- a/TypeScript/9RouterHooks/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/QuestCallbacks.d.ts @@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class QuestCallbacks { - private httpResponse; - private questController; - private repeatableQuestController; + protected httpResponse: HttpResponseUtil; + protected questController: QuestController; + protected repeatableQuestController: RepeatableQuestController; constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController); changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts index 7bbc7b5..d5bab8b 100644 --- a/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts @@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RagfairServer } from "../servers/RagfairServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairCallbacks extends OnLoadOnUpdate { - private httpResponse; - private logger; - private jsonUtil; - private ragfairServer; - private ragfairController; - private configServer; - private ragfairConfig; + protected httpResponse: HttpResponseUtil; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected ragfairServer: RagfairServer; + protected ragfairController: RagfairController; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/9RouterHooks/types/callbacks/RepairCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/RepairCallbacks.d.ts index f63ec18..63733fa 100644 --- a/TypeScript/9RouterHooks/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/RepairCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; export declare class RepairCallbacks { - private repairController; + protected repairController: RepairController; constructor(repairController: RepairController); traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/callbacks/SaveCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/SaveCallbacks.d.ts index b7219a0..bbb6e53 100644 --- a/TypeScript/9RouterHooks/types/callbacks/SaveCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/SaveCallbacks.d.ts @@ -1,7 +1,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate"; import { SaveServer } from "../servers/SaveServer"; export declare class SaveCallbacks extends OnLoadOnUpdate { - private saveServer; + protected saveServer: SaveServer; constructor(saveServer: SaveServer); onLoad(): void; getRoute(): string; diff --git a/TypeScript/9RouterHooks/types/callbacks/TradeCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/TradeCallbacks.d.ts index 9928951..272ae46 100644 --- a/TypeScript/9RouterHooks/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/TradeCallbacks.d.ts @@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData"; export declare class TradeCallbacks { - private tradeController; + protected tradeController: TradeController; constructor(tradeController: TradeController); processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts index 2a8af7f..128d9b2 100644 --- a/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts @@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class TraderCallbacks extends OnLoadOnUpdate { - private httpResponse; - private traderController; + protected httpResponse: HttpResponseUtil; + protected traderController: TraderController; constructor(httpResponse: HttpResponseUtil, traderController: TraderController); onLoad(): void; getRoute(): string; diff --git a/TypeScript/9RouterHooks/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/WeatherCallbacks.d.ts index e40ab3e..ae784c8 100644 --- a/TypeScript/9RouterHooks/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/WeatherCallbacks.d.ts @@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class WeatherCallbacks { - private httpResponse; - private weatherController; + protected httpResponse: HttpResponseUtil; + protected weatherController: WeatherController; constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController); getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/9RouterHooks/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/WishlistCallbacks.d.ts index e0249fd..c2cc2a8 100644 --- a/TypeScript/9RouterHooks/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/WishlistCallbacks.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; export declare class WishlistCallbacks { - private wishlistController; + protected wishlistController: WishlistController; constructor(wishlistController: WishlistController); addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts index 455d4a0..09a1788 100644 --- a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts @@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class BotController { - private databaseServer; - private botGenerator; - private botHelper; - private configServer; - private botConfig; + protected databaseServer: DatabaseServer; + protected botGenerator: BotGenerator; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer); /** * Return the number of bot loadout varieties to be generated @@ -19,6 +20,7 @@ export declare class BotController { * @returns */ getBotPresetGenerationLimit(type: string): number; + getBotCoreDifficulty(): IBotCore; /** * Get bot difficulty settings * adjust PMC settings to ensure they engage the correct bot types @@ -26,8 +28,8 @@ export declare class BotController { * @param difficulty difficulty level server requested settings for * @returns Difficulty object */ - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - private getPmcDifficultySettings; + getBotDifficulty(type: string, difficulty: string): Difficulty; + protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty; generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; getBotCap(): number; } diff --git a/TypeScript/9RouterHooks/types/controllers/CustomizationController.d.ts b/TypeScript/9RouterHooks/types/controllers/CustomizationController.d.ts index 698e6be..a6c4730 100644 --- a/TypeScript/9RouterHooks/types/controllers/CustomizationController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/CustomizationController.d.ts @@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; export declare class CustomizationController { - private logger; - private itemEventRouter; - private databaseServer; - private saveServer; - private profileHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); getTraderSuits(traderID: string, sessionID: string): ISuit[]; wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; - private getAllTraderSuits; + protected getAllTraderSuits(sessionID: string): ISuit[]; } diff --git a/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts b/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts index 235594f..b15c4b6 100644 --- a/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts @@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; -import { DialogueInfo } from "../models/eft/profile/IAkiProfile"; +import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile"; import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class DialogueController { - private httpResponse; - private saveServer; - private dialogueHelper; + protected httpResponse: HttpResponseUtil; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper); getFriendList(sessionID: string): IGetFriendListDataResponse; generateDialogueList(sessionID: string): IGetBodyResponseData; @@ -19,7 +19,7 @@ export declare class DialogueController { setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; setRead(dialogueIDs: string[], sessionID: string): void; getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; - private messagesHaveUncollectedRewards; - private removeExpiredItems; + protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected removeExpiredItems(sessionID: string): void; update(): void; } diff --git a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts index bb2a55a..7f632d6 100644 --- a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts @@ -1,28 +1,33 @@ +import { GameHelper } from "../helpers/GameHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; +import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { Watermark } from "../utils/Watermark"; export declare class GameController { - private logger; - private watermark; - private httpServerHelper; - private profileHelper; - private configServer; - private httpConfig; - constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); + protected logger: ILogger; + protected watermark: Watermark; + protected httpServerHelper: HttpServerHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void; - private addMissingBonusesProperty; - private addMissingRepeatableQuestsProperty; - private addMissingWeaponRepairSkill; - private addMissingAkiVersionTagToProfile; - private addMissingArmorRepairSkill; - private fixNullTraderSalesSums; - private removeDanglingConditionCounters; - private removeDanglingBackendCounters; + protected addMissingBonusesProperty(pmcProfile: IPmcData): void; + protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; + protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; + protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; + protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; + protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; + protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; getGameConfig(sessionID: string): IGameConfigResponse; getServer(): any[]; - private getActiveRepeatableQuests; + protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; } diff --git a/TypeScript/9RouterHooks/types/controllers/HandbookController.d.ts b/TypeScript/9RouterHooks/types/controllers/HandbookController.d.ts index f473437..52d2dd8 100644 --- a/TypeScript/9RouterHooks/types/controllers/HandbookController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/HandbookController.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "../helpers/HandbookHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class HandbookController { - private databaseServer; - private handbookHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper); load(): void; } diff --git a/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts b/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts index ca049f6..aafb8df 100644 --- a/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts @@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class HealthController { - private logger; - private itemEventRouter; - private itemHelper; - private paymentService; - private inventoryHelper; - private healthHelper; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected inventoryHelper: InventoryHelper; + protected healthHelper: HealthHelper; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts b/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts index f35c23b..f2930ff 100644 --- a/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts @@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; +import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; +import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData"; @@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HideoutController { - private logger; - private hashUtil; - private timeUtil; - private databaseServer; - private randomUtil; - private inventoryHelper; - private saveServer; - private playerService; - private presetHelper; - private paymentHelper; - private itemEventRouter; - private httpResponse; - private profileHelper; - private hideoutHelper; - private configServer; - private hideoutConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected inventoryHelper: InventoryHelper; + protected saveServer: SaveServer; + protected playerService: PlayerService; + protected presetHelper: PresetHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected hideoutHelper: HideoutHelper; + protected configServer: ConfigServer; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer); upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; + protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; + protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): { + [x: string]: number; + }; + protected getRandomisedScavRewards(rarityItemCounter: { + [x: string]: number; + }): Product[]; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; + protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; + protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; update(): void; } diff --git a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts index c1cd6f5..7f2036c 100644 --- a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts @@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { InsuranceService } from "../services/InsuranceService"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InraidController { - private saveServer; - private jsonUtil; - private databaseServer; - private questHelper; - private itemHelper; - private extendedProfileHelper; - private healthHelper; - private traderHelper; - private insuranceService; - private inRaidHelper; - private configServer; - private inraidConfig; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected itemHelper: ItemHelper; + protected extendedProfileHelper: ExtendedProfileHelper; + protected healthHelper: HealthHelper; + protected traderHelper: TraderHelper; + protected insuranceService: InsuranceService; + protected inRaidHelper: InRaidHelper; + protected configServer: ConfigServer; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void; diff --git a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts index b175a06..db2c567 100644 --- a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts @@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceController { - private logger; - private randomUtil; - private itemEventRouter; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private profileHelper; - private dialogueHelper; - private paymentService; - private insuranceService; - private configServer; - private insuranceConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected itemEventRouter: ItemEventRouter; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected profileHelper: ProfileHelper; + protected dialogueHelper: DialogueHelper; + protected paymentService: PaymentService; + protected insuranceService: InsuranceService; + protected configServer: ConfigServer; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required insuranceService: InsuranceService, configServer: ConfigServer); processReturn(): void; diff --git a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts index 8235082..b732aa9 100644 --- a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts @@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class InventoryController { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; - private presetHelper; - private inventoryHelper; - private profileHelper; - private paymentHelper; - private itemEventRouter; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected presetHelper: PresetHelper; + protected inventoryHelper: InventoryHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemEventRouter: ItemEventRouter; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); /** * Move Item diff --git a/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts b/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts index 2a30713..1af1f56 100644 --- a/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts @@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData"; import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "../models/eft/launcher/IRegisterData"; import { Info } from "../models/eft/profile/IAkiProfile"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class LauncherController { - private hashUtil; - private saveServer; - private httpServerHelper; - private databaseServer; - private configServer; - private coreConfig; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected httpServerHelper: HttpServerHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected coreConfig: ICoreConfig; constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer); connect(): any; find(sessionIdKey: string): Info; login(info: ILoginRequestData): string; register(info: IRegisterData): string; - private createAccount; + protected createAccount(info: IRegisterData): string; changeUsername(info: IChangeRequestData): string; changePassword(info: IChangeRequestData): string; wipe(info: IRegisterData): string; diff --git a/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts b/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts index 41a8719..90b6d7a 100644 --- a/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts @@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { - private jsonUtil; - private logger; - private locationGenerator; - private databaseServer; - private timeUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected locationGenerator: LocationGenerator; + protected databaseServer: DatabaseServer; + protected timeUtil: TimeUtil; constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil); get(location: string): ILocationBase; generate(name: string): ILocationBase; diff --git a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts index 84abbe3..c322d96 100644 --- a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts @@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; +import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; +import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { MatchLocationService } from "../services/MatchLocationService"; export declare class MatchController { - private saveServer; - private profileHelper; - private matchLocationService; - private traderHelper; - private configServer; - private matchConfig; - private inraidConfig; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected matchLocationService: MatchLocationService; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected matchConfig: IMatchConfig; + protected inraidConfig: IInRaidConfig; constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); getEnabled(): boolean; getProfile(info: IGetProfileRequestData): IPmcData[]; - private getMatch; + protected getMatch(location: any): any; createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; joinMatch(info: any, sessionID: string): any[]; diff --git a/TypeScript/9RouterHooks/types/controllers/NoteController.d.ts b/TypeScript/9RouterHooks/types/controllers/NoteController.d.ts index 4d3420e..cc78383 100644 --- a/TypeScript/9RouterHooks/types/controllers/NoteController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/NoteController.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { ItemEventRouter } from "../routers/ItemEventRouter"; declare class NoteController { - private itemEventRouter; + protected itemEventRouter: ItemEventRouter; constructor(itemEventRouter: ItemEventRouter); addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/controllers/NotifierController.d.ts b/TypeScript/9RouterHooks/types/controllers/NotifierController.d.ts index 36fef66..31d7bfe 100644 --- a/TypeScript/9RouterHooks/types/controllers/NotifierController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/NotifierController.d.ts @@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService"; import { INotifierChannel } from "../models/eft/notifier/INotifier"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; export declare class NotifierController { - private notifierHelper; - private httpServerHelper; - private notificationService; - private pollInterval; - private timeout; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected notificationService: NotificationService; + protected pollInterval: number; + protected timeout: number; constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService); /** * Resolve an array of session notifications. diff --git a/TypeScript/9RouterHooks/types/controllers/PresetBuildController.d.ts b/TypeScript/9RouterHooks/types/controllers/PresetBuildController.d.ts index 11c5c3e..adf4084 100644 --- a/TypeScript/9RouterHooks/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/PresetBuildController.d.ts @@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter"; import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; export declare class PresetBuildController { - private hashUtil; - private itemEventRouter; - private itemHelper; - private saveServer; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); getUserBuilds(sessionID: string): WeaponBuild[]; saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/controllers/PresetController.d.ts b/TypeScript/9RouterHooks/types/controllers/PresetController.d.ts index 6ec8c55..ca1af1a 100644 --- a/TypeScript/9RouterHooks/types/controllers/PresetController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/PresetController.d.ts @@ -1,8 +1,8 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetController { - private presetHelper; - private databaseServer; + protected presetHelper: PresetHelper; + protected databaseServer: DatabaseServer; constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer); initialize(): void; } diff --git a/TypeScript/9RouterHooks/types/controllers/ProfileController.d.ts b/TypeScript/9RouterHooks/types/controllers/ProfileController.d.ts index c8bd5f1..9b7a6d5 100644 --- a/TypeScript/9RouterHooks/types/controllers/ProfileController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/ProfileController.d.ts @@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class ProfileController { - private hashUtil; - private timeUtil; - private saveServer; - private databaseServer; - private itemHelper; - private traderHelper; - private extendedProfileHelper; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected traderHelper: TraderHelper; + protected extendedProfileHelper: ExtendedProfileHelper; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper); getMiniProfiles(): IMiniProfile[]; getMiniProfile(sessionID: string): any; diff --git a/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts b/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts index d8caee5..c00cd6d 100644 --- a/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts @@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IQuest } from "../models/eft/common/tables/IQuest"; +import { IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { PlayerService } from "../services/PlayerService"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { - private logger; - private timeUtil; - private itemEventRouter; - private databaseServer; - private itemHelper; - private dialogueHelper; - private profileHelper; - private questHelper; - private questConditionHelper; - private playerService; - private configServer; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected questHelper: QuestHelper; + protected questConditionHelper: QuestConditionHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer); + /** + * Get all quests visible to player + * Exclude quests with incomplete preconditions (level/loyalty) + * @param sessionID session id + * @returns array of IQuest + */ getClientQuests(sessionID: string): IQuest[]; acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Remove completed quest from profile + * Add newly unlocked quests to profile + * Also recalculate thier level due to exp rewards + * @param pmcData Player profile + * @param body completed quest request + * @param sessionID session id + * @returns ItemEvent response + */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Send a popup to player on completion of a quest + * @param sessionID session id + * @param pmcData player profile + * @param completedQuestId completed quest id + * @param questRewards rewards given to player + */ + protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + /** + * Returns a list of quests that should be failed when a quest is completed + * @param completedQuestId quest completed id + * @returns array of quests + */ + protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; + /** + * Fail the quests provided + * @param sessionID session id + * @param pmcData player profile + * @param questsToFail quests to fail + */ + protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void; handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts b/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts index 5b94a95..c758593 100644 --- a/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts @@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairController { - private logger; - private timeUtil; - private httpResponse; - private itemEventRouter; - private ragfairServer; - private ragfairPriceService; - private databaseServer; - private itemHelper; - private saveServer; - private ragfairSellHelper; - private ragfairTaxHelper; - private ragfairSortHelper; - private ragfairOfferHelper; - private profileHelper; - private paymentService; - private handbookHelper; - private paymentHelper; - private inventoryHelper; - private ragfairHelper; - private ragfairOfferService; - private ragfairRequiredItemsService; - private ragfairOfferGenerator; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected httpResponse: HttpResponseUtil; + protected itemEventRouter: ItemEventRouter; + protected ragfairServer: RagfairServer; + protected ragfairPriceService: RagfairPriceService; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected saveServer: SaveServer; + protected ragfairSellHelper: RagfairSellHelper; + protected ragfairTaxHelper: RagfairTaxHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairOfferHelper: RagfairOfferHelper; + protected profileHelper: ProfileHelper; + protected paymentService: PaymentService; + protected handbookHelper: HandbookHelper; + protected paymentHelper: PaymentHelper; + protected inventoryHelper: InventoryHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; update(): void; diff --git a/TypeScript/9RouterHooks/types/controllers/RepairController.d.ts b/TypeScript/9RouterHooks/types/controllers/RepairController.d.ts index 77dd47a..330684d 100644 --- a/TypeScript/9RouterHooks/types/controllers/RepairController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/RepairController.d.ts @@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { PaymentService } from "../services/PaymentService"; export declare class RepairController { - private logger; - private itemEventRouter; - private databaseServer; - private questHelper; - private traderHelper; - private paymentService; - private repairHelper; - private configServer; - private repairConfig; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; + protected traderHelper: TraderHelper; + protected paymentService: PaymentService; + protected repairHelper: RepairHelper; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; + protected readonly WEAPON_SKILL_REPAIR_GAIN: number; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); /** * Repair with trader @@ -36,5 +38,5 @@ export declare class RepairController { * @param sessionID session id * @returns item event router action */ - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts b/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts index 2dedc7e..9aa9590 100644 --- a/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts @@ -1,3 +1,4 @@ +import { GameHelper } from "../helpers/GameHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; @@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest"; import { ELocationName } from "../models/enums/ELocationName"; -import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -48,22 +49,23 @@ export interface ITargetLocation { locations: string[]; } export declare class RepeatableQuestController { - private timeUtil; - private logger; - private randomUtil; - private mathUtil; - private jsonUtil; - private databaseServer; - private itemHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private itemEventRouter; - private paymentService; - private objectId; - private configServer; - private questConfig; - constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); + protected timeUtil: TimeUtil; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected mathUtil: MathUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected gameHelper: GameHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected itemEventRouter: ItemEventRouter; + protected paymentService: PaymentService; + protected objectId: ObjectId; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; + constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer); /** * This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts b/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts index f0a177b..c86745c 100644 --- a/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts @@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ILogger } from "../models/spt/utils/ILogger"; declare class TradeController { - private logger; - private itemEventRouter; - private tradeHelper; - private profileHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected tradeHelper: TradeHelper; + protected profileHelper: ProfileHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts b/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts index 36eac75..7bab158 100644 --- a/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts @@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class TraderController { - private logger; - private databaseServer; - private traderAssortHelper; - private profileHelper; - private traderHelper; - private timeUtil; - private traderAssortService; - private jsonUtil; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected traderAssortHelper: TraderAssortHelper; + protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; + protected timeUtil: TimeUtil; + protected traderAssortService: TraderAssortService; + protected jsonUtil: JsonUtil; constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil); load(): void; getTrader(traderID: string, sessionID: string): ITraderBase; diff --git a/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts b/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts index 312c3a3..ca7f5eb 100644 --- a/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts @@ -1,10 +1,11 @@ import { WeatherGenerator } from "../generators/WeatherGenerator"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WeatherController { - private weatherGenerator; - private configServer; - private weatherConfig; + protected weatherGenerator: WeatherGenerator; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer); generate(): IWeatherData; } diff --git a/TypeScript/9RouterHooks/types/controllers/WishlistController.d.ts b/TypeScript/9RouterHooks/types/controllers/WishlistController.d.ts index 5ef8df3..a96c522 100644 --- a/TypeScript/9RouterHooks/types/controllers/WishlistController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/WishlistController.d.ts @@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class WishlistController { - private itemEvenRouter; + protected itemEvenRouter: ItemEventRouter; constructor(itemEvenRouter: ItemEventRouter); addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts index e2565b7..88a8014 100644 --- a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts @@ -1,7 +1,10 @@ import { BotHelper } from "../helpers/BotHelper"; import { GameEventHelper } from "../helpers/GameEventHelper"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; +import { Health as PmcHealth } from "../models/eft/common/IPmcData"; import { IBotBase } from "../models/eft/common/tables/IBotBase"; +import { Health, Inventory, Skills } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotInventoryGenerator } from "./BotInventoryGenerator"; +declare namespace BotGenerator { + interface IRandomisedBotLevelResult { + level: number; + exp: number; + } +} export declare class BotGenerator { - private logger; - private hashUtil; - private randomUtil; - private jsonUtil; - private databaseServer; - private botInventoryGenerator; - private botHelper; - private gameEventHelper; - private configServer; - private botConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected botInventoryGenerator: BotInventoryGenerator; + protected botHelper: BotHelper; + protected gameEventHelper: GameEventHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer); generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[]; - private generateBot; - private generateRandomLevel; + protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase; + protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult; /** Converts health object to the required format */ - private generateHealth; - private generateSkills; - private getPmcRole; - private removeChristmasItemsFromBotInventory; - private generateId; - private generateInventoryID; - private getPMCDifficulty; - private generateDogtag; + protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth; + protected generateSkills(skillsObj: Skills): Skills; + protected getPmcRole(pmcSide: string): string; + protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void; + protected generateId(bot: IBotBase): IBotBase; + protected generateInventoryID(profile: IBotBase): IBotBase; + protected getPMCDifficulty(requestedDifficulty: string): string; + protected generateDogtag(bot: IBotBase): IBotBase; } +export {}; diff --git a/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts index 0cdbacb..783d0c5 100644 --- a/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts @@ -1,5 +1,5 @@ import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType"; +import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; @@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; export declare class BotInventoryGenerator { - private logger; - private hashUtil; - private randomUtil; - private databaseServer; - private botWeaponGenerator; - private botLootGenerator; - private botGeneratorHelper; - private weightedRandomHelper; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected botWeaponGenerator: BotWeaponGenerator; + protected botLootGenerator: BotLootGenerator; + protected botGeneratorHelper: BotGeneratorHelper; + protected weightedRandomHelper: WeightedRandomHelper; constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper); generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory; - private generateEquipment; - private generateInventoryBase; + protected generateEquipment(equipmentSlot: string, equipmentPool: Record, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void; + protected generateInventoryBase(): PmcInventory; } diff --git a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts index 1d8c8e1..1d91836 100644 --- a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts @@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotLootGenerator { - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private botGeneratorHelper; - private pmcLootGenerator; - private configServer; - private botConfig; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected pmcLootGenerator: PMCLootGenerator; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer); generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void; - private getRandomisedCount; - private addLootFromPool; + protected getRandomisedCount(min: number, max: number, nValue: number): number; + protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void; /** Compares two item templates by their price to spawn chance ratio */ - private compareByValue; + protected compareByValue(a: ITemplateItem, b: ITemplateItem): number; } diff --git a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts index e8f91cb..a43b18c 100644 --- a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts @@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotWeaponGenerator { - private logger; - private hashUtil; - private databaseServer; - private itemHelper; - private weightedRandomHelper; - private botGeneratorHelper; - private randomUtil; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected databaseServer: DatabaseServer; + protected itemHelper: ItemHelper; + protected weightedRandomHelper: WeightedRandomHelper; + protected botGeneratorHelper: BotGeneratorHelper; + protected randomUtil: RandomUtil; + private readonly modMagazineSlotId; constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); - generateWeapon(equipmentSlot: string, weaponPool: Record, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; + /** + * Get the mods necessary to kit out a weapon to its preset level + * @param weaponTpl weapon to find preset for + * @param equipmentSlot the slot the weapon will be placed in + * @param weaponParentId + * @returns array of weapon mods + */ + protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** Checks if all required slots are occupied on a weapon and all it's mods */ - private isWeaponValid; + protected isWeaponValid(itemList: Item[]): boolean; /** - * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. - * Additionally, adds extra bullets to SecuredContainer - * - * @param {*} weaponMods - * @param {*} weaponTemplate - * @param {*} magCounts - * @param {*} ammoTpl - * @returns - */ - private generateExtraMagazines; - private addBullets; + * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. + * Additionally, adds extra bullets to SecuredContainer + * @param weaponMods + * @param weaponTemplate + * @param magCounts + * @param ammoTpl + * @param inventory + * @returns + */ + protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; /** - * Finds and returns tpl of ammo that should be used, while making sure it's compatible + * Get a randomised count of magazines + * @param magCounts min and max value returned value can be between + * @returns numberical value of magazine count + */ + protected getRandomisedMagazineCount(magCounts: MinMax): number; + /** + * Add ammo to the secure container + * @param stackCount How many stacks of ammo to add + * @param ammoTpl Ammo type to add + * @param stackSize Size of the ammo stack to add + * @param inventory Player inventory + */ + protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void; + /** + * Get a weapons magazine tpl from a weapon template + * @param weaponMods mods from a weapon template + * @param weaponTemplate Weapon to get magazine tpl for + * @returns magazine tpl string + */ + protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void; + /** + * Finds and returns compatible ammo tpl * * @param {*} weaponMods * @param {*} weaponTemplate - * @returns + * @returns compatible ammo tpl */ - private getCompatibleAmmo; - /** Fill existing magazines to full, while replacing their contents with specified ammo */ - private fillExistingMagazines; + protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string; + /** + * Fill existing magazines to full, while replacing their contents with specified ammo + * @param weaponMods + * @param magazine + * @param ammoTpl + */ + protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; + /** + * Fill each Camora with a bullet + * @param weaponMods Weapon mods to find and update camora mod(s) from + * @param magazineId magazine id to find and add to + * @param ammoTpl ammo template id to hydate with + */ + protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void; } diff --git a/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts index 4b96792..bd368b5 100644 --- a/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts @@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { ILooseLoot, 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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { JsonUtil } from "../utils/JsonUtil"; @@ -18,27 +20,27 @@ export interface IContainerItem { height: number; } export declare class LocationGenerator { - private logger; - private jsonUtil; - private objectId; - private randomUtil; - private ragfairServerHelper; - private itemHelper; - private mathUtil; - private gameEventHelper; - private containerHelper; - private presetHelper; - private configServer; - private locationConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected objectId: ObjectId; + protected randomUtil: RandomUtil; + protected ragfairServerHelper: RagfairServerHelper; + protected itemHelper: ItemHelper; + protected mathUtil: MathUtil; + protected gameEventHelper: GameEventHelper; + protected containerHelper: ContainerHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer); generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; - private getLooseLootMultiplerForLocation; - private getStaticLootMultiplerForLocation; + protected getLooseLootMultiplerForLocation(location: string): number; + protected getStaticLootMultiplerForLocation(location: string): number; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; - private createItem; - private getRandomCompatibleCaliberTemplateId; - private getRandomValidCaliber; - private drawAmmoTpl; - private createRandomMagCartridges; - private createCartidges; + protected createItem(tpl: string, staticAmmoDist: Record, parentId?: string): IContainerItem; + protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string; + protected getRandomValidCaliber(magTemplate: ITemplateItem): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string; + protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record, caliber?: string): Item; + protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item; } diff --git a/TypeScript/9RouterHooks/types/generators/PMCLootGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/PMCLootGenerator.d.ts index 601431b..64e6f7f 100644 --- a/TypeScript/9RouterHooks/types/generators/PMCLootGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/PMCLootGenerator.d.ts @@ -1,13 +1,14 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ConfigServer } from "../servers/ConfigServer"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; export declare class PMCLootGenerator { - private itemHelper; - private databaseServer; - private configServer; - private pocketLootPool; - private backpackLootPool; - private botConfig; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected pocketLootPool: string[]; + protected backpackLootPool: string[]; + protected botConfig: IBotConfig; constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); generatePMCPocketLootPool(): string[]; generatePMCBackpackLootPool(): string[]; diff --git a/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts index 06d3250..cbdd7f2 100644 --- a/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts @@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class RagfairAssortGenerator { - private jsonUtil; - private hashUtil; - private itemHelper; - private databaseServer; - private generatedAssortItems; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected generatedAssortItems: Item[]; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer); /** * Get an array of unique items that can be sold on the flea * @returns array of unique items */ getAssortItems(): Item[]; - private assortsAreGenerated; + protected assortsAreGenerated(): boolean; /** * Generate an array of items the flea can sell * @returns array of unique items */ - private generateRagfairAssortItems; - private createRagfairAssortItem; + protected generateRagfairAssortItems(): Item[]; + protected createRagfairAssortItem(tplId: string, id?: string): Item; } diff --git a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts index e3fbe4a..de53ea9 100644 --- a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts @@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; export declare class RagfairOfferGenerator { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private timeUtil; - private databaseServer; - private ragfairServerHelper; - private saveServer; - private presetHelper; - private ragfairAssortGenerator; - private ragfairOfferService; - private ragfairPriceService; - private fenceService; - private itemHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected saveServer: SaveServer; + protected presetHelper: PresetHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairPriceService: RagfairPriceService; + protected fenceService: FenceService; + protected itemHelper: ItemHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; - private getTraderId; - private getRating; - private getRatingGrowing; - private getOfferEndTime; + protected getTraderId(userID: string): string; + protected getRating(userID: string): number; + protected getRatingGrowing(userID: string): boolean; + protected getOfferEndTime(userID: string, time: number): number; /** * Create multiple offers for items by using a unique list of items we've generated previously * @param expiredOffers */ generateDynamicOffers(expiredOffers?: Item[]): void; generateTraderOffers(traderID: string): void; - private getItemCondition; - private addMissingCondition; - private getOfferRequirements; + protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; + protected addMissingCondition(item: Item): Item; + protected getOfferRequirements(items: Item[]): { + count: number; + _tpl: string; + }[]; /** * Create a flea offer and store it in the Ragfair server offers array */ diff --git a/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts index b9faa3a..44cecbb 100644 --- a/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts @@ -1,19 +1,33 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ConfigServer } from "../servers/ConfigServer"; import { IWeatherData } from "../models/eft/weather/IWeatherData"; +import { IWeatherConfig } from "../models/spt/config/IWeatherConfig"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class WeatherGenerator { - private weightedRandomHelper; - private randomUtil; - private timeUtil; - private configServer; - private weatherConfig; + protected weightedRandomHelper: WeightedRandomHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateTime(data: IWeatherData): IWeatherData; + /** + * Get server uptime seconds multiplied by a multiplier and add to current time as seconds + * Format to BSGs requirements + * @param computedDate current date + * @returns formatted time + */ + protected getAcceleratedTime(computedDate: Date): string; + /** + * Get current time formatted to fit BSGs requirement + * @param computedDate + * @returns + */ + protected getNormalTime(computedDate: Date): string; generateWeather(data: IWeatherData): IWeatherData; - private getWeightedFog; - private getWeightedRain; - private getRandomFloat; - private getRandomInt; + protected getWeightedFog(): string; + protected getWeightedRain(): number; + protected getRandomFloat(node: string): number; + protected getRandomInt(node: string): number; } diff --git a/TypeScript/9RouterHooks/types/helpers/AssortHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/AssortHelper.d.ts index 33cb5c6..15586b9 100644 --- a/TypeScript/9RouterHooks/types/helpers/AssortHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/AssortHelper.d.ts @@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemHelper } from "./ItemHelper"; import { QuestHelper } from "./QuestHelper"; export declare class AssortHelper { - private logger; - private itemHelper; - private databaseServer; - private questHelper; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected databaseServer: DatabaseServer; + protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper); + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort assort items from a trader + * @returns assort items minus locked quest assorts + */ + stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyality assorts + */ + stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from asort + * @returns Modified assort + */ removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort; - stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; - stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort; } diff --git a/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts index 141f71d..e4b0c11 100644 --- a/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/BotGeneratorHelper.d.ts @@ -1,8 +1,9 @@ import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; import { Mods, ModsChances } from "../models/eft/common/tables/IBotType"; -import { Item, Upd } from "../models/eft/common/tables/IItem"; -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem"; +import { Grid, ITemplateItem, Slot } 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"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ContainerHelper } from "./ContainerHelper"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; +import { ProbabilityHelper } from "./ProbabilityHelper"; export declare class BotGeneratorHelper { - private logger; - private jsonUtil; - private hashUtil; - private randomUtil; - private databaseServer; - private durabilityLimitsHelper; - private itemHelper; - private inventoryHelper; - private containerHelper; - private configServer; - private botConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected randomUtil: RandomUtil; + protected probabilityHelper: ProbabilityHelper; + protected databaseServer: DatabaseServer; + protected durabilityLimitsHelper: DurabilityLimitsHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected containerHelper: ContainerHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; + constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; + /** + * Get a list of non black-listed cartridges from the PMC bot config + * @param modSlot mod item slot + * @param itemModPool + * @returns string array of cartridges PMCs can use + */ + protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record): string[]; + /** + * randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot + * never return true for an item that has 0% spawn chance + * @param itemSlot slot the item sits in + * @param modSlot slot the mod sits in + * @param modSpawnChances Chances for various mod spawns + * @returns boolean true if it should spawn + */ + protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean; + /** + * Get a list of containers that hold ammo + * @returns string array + */ + protected getAmmoContainers(): string[]; + /** + * Get the slot details for an item (chamber/cartridge/slot) + * @param modSlot e.g patron_in_weapon + * @param parentTemplate item template + * @returns + */ + protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. @@ -37,16 +68,50 @@ export declare class BotGeneratorHelper { * @param {string} parentId The CylinderMagazine's UID * @param {object} parentTemplate The CylinderMagazine's template */ - private fillCamora; + protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { - "upd"?: Upd; + upd?: Upd; }; - private getModTplFromItemDb; + /** + * Create a repairable object for a weapon that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + /** + * Create a repairable object for an armor that containers durability + max durability properties + * @param itemTemplate weapon object being generated for + * @param botRole type of bot being generated for + * @returns Repairable object + */ + protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; + protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; + /** + * Sort by spawn chance, highest to lowest, higher is more common + * @param unsortedModArray String array to sort + * @returns Sorted string array + */ + protected sortModArray(unsortedModArray: string[]): string[]; + /** + * Can an item be added to an item without issue + * @param items + * @param tplToCheck + * @param equipmentSlot + * @returns true if possible + */ isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean; - /** Adds an item with all its childern into specified equipmentSlots, wherever it fits. - * Returns a `boolean` indicating success. */ + /** + * Adds an item with all its childern into specified equipmentSlots, wherever it fits. + * @param equipmentSlots + * @param parentId + * @param parentTpl + * @param itemWithChildren + * @param inventory + * @returns a `boolean` indicating item was added + */ addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean; - private itemAllowedInContainer; + protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean; } export declare class ExhaustableArray { private itemPool; diff --git a/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts index 98cdfdc..6b92566 100644 --- a/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts @@ -1,16 +1,17 @@ import { Difficulty } from "../models/eft/common/tables/IBotType"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class BotHelper { - private logger; - private jsonUtil; - private databaseServer; - private randomUtil; - private configServer; - private botConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer); getBotDifficultySettings(type: string, difficulty: string): Difficulty; getPmcDifficultySettings(type: string, difficulty: string): Difficulty; @@ -33,7 +34,7 @@ export declare class BotHelper { * @param difficultySettings bot settings to alter * @param typesToAdd bot type to add to enemy list */ - addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void; + addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void; /** * Add a bot to the REVENGE_BOT_TYPES array * @param difficultySettings bot settings to alter diff --git a/TypeScript/9RouterHooks/types/helpers/ContainerHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ContainerHelper.d.ts index 34cd1e4..3c2ee93 100644 --- a/TypeScript/9RouterHooks/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,7 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - private locateSlot; + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; } diff --git a/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts index ae1f581..9776c6a 100644 --- a/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts @@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper"; import { NotificationSendHelper } from "./NotificationSendHelper"; import { NotifierHelper } from "./NotifierHelper"; export declare class DialogueHelper { - private hashUtil; - private saveServer; - private databaseServer; - private notifierHelper; - private notificationSendHelper; - private itemHelper; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected itemHelper: ItemHelper; constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; diff --git a/TypeScript/9RouterHooks/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/DurabilityLimitsHelper.d.ts index 609bc7d..07a5db1 100644 --- a/TypeScript/9RouterHooks/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/DurabilityLimitsHelper.d.ts @@ -1,25 +1,26 @@ import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IBotConfig } from "../models/spt/config/IBotConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { BotHelper } from "./BotHelper"; export declare class DurabilityLimitsHelper { - private randomUtil; - private botHelper; - private configServer; - private botConfig; + protected randomUtil: RandomUtil; + protected botHelper: BotHelper; + protected configServer: ConfigServer; + protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; - private generateMaxWeaponDurability; - private generateMaxPmcArmorDurability; - private getLowestMaxWeaponFromConfig; - private getHighestMaxWeaponDurabilityFromConfig; - private generateWeaponDurability; - private generateArmorDurability; - private getMinWeaponDeltaFromConfig; - private getMaxWeaponDeltaFromConfig; - private getMinArmorDeltaFromConfig; - private getMaxArmorDeltaFromConfig; + protected generateMaxWeaponDurability(botRole: string): number; + protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; + protected getLowestMaxWeaponFromConfig(botRole: string): number; + protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number; + protected generateWeaponDurability(botRole: string, maxDurability: number): number; + protected generateArmorDurability(botRole: string, maxDurability: number): number; + protected getMinWeaponDeltaFromConfig(botRole: string): number; + protected getMaxWeaponDeltaFromConfig(botRole: string): number; + protected getMinArmorDeltaFromConfig(botRole: string): number; + protected getMaxArmorDeltaFromConfig(botRole: string): number; } diff --git a/TypeScript/9RouterHooks/types/helpers/ExtendedProfileHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ExtendedProfileHelper.d.ts index 4dd7d3a..d8b754d 100644 --- a/TypeScript/9RouterHooks/types/helpers/ExtendedProfileHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ExtendedProfileHelper.d.ts @@ -1,5 +1,5 @@ import { BotGenerator } from "../generators/BotGenerator"; -import { IPmcData } from "../models/eft/common/IPmcData"; +import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { FenceService } from "../services/FenceService"; @@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class ExtendedProfileHelper extends ProfileHelper { - private botGenerator; + protected botGenerator: BotGenerator; constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator); generatePlayerScav(sessionID: string): IPmcData; - private getScavSkills; - private removeSecureContainer; - private getDefaultScavSkills; - private getScavStats; - private getScavLevel; - private getScavExperience; - private setScavCooldownTimer; + protected getScavSkills(sessionID: string): Skills; + protected removeSecureContainer(profile: IPmcData): IPmcData; + protected getDefaultScavSkills(): Skills; + protected getScavStats(sessionID: string): Stats; + protected getScavLevel(sessionID: string): number; + protected getScavExperience(sessionID: string): number; + protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData; } diff --git a/TypeScript/9RouterHooks/types/helpers/GameEventHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/GameEventHelper.d.ts index 8131d31..b2d6377 100644 --- a/TypeScript/9RouterHooks/types/helpers/GameEventHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/GameEventHelper.d.ts @@ -1,6 +1,6 @@ import { DatabaseServer } from "../servers/DatabaseServer"; export declare class GameEventHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); get EVENT(): Record; get christmasEventItems(): string[]; diff --git a/TypeScript/9RouterHooks/types/helpers/GameHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/GameHelper.d.ts new file mode 100644 index 0000000..fd49e84 --- /dev/null +++ b/TypeScript/9RouterHooks/types/helpers/GameHelper.d.ts @@ -0,0 +1,11 @@ +import { IPmcData } from "../models/eft/common/IPmcData"; +import { ILogger } from "../models/spt/utils/ILogger"; +export declare class GameHelper { + protected logger: ILogger; + constructor(logger: ILogger); + /** + * Remove condition conters no longer used + * @param pmcProfile profile to remove old counters from + */ + removeDanglingConditionCounters(pmcProfile: IPmcData): void; +} diff --git a/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts index aed6984..b47d466 100644 --- a/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts @@ -9,7 +9,7 @@ export declare class LookupCollection { constructor(); } export declare class HandbookHelper { - private lookup; + protected lookup: LookupCollection; hydrateLookup(lookup: LookupCollection): void; getTemplatePrice(x: string): number; templatesWithParent(x: string): string[]; diff --git a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts index bb160a3..518c23f 100644 --- a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts @@ -1,23 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; +import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { SaveServer } from "../servers/SaveServer"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class HealthHelper { - private jsonUtil; - private logger; - private timeUtil; - private saveServer; - private configServer; - private healthConfig; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected configServer: ConfigServer; + protected healthConfig: IHealthConfig; constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); resetVitality(sessionID: string): IAkiProfile; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void; - private saveHealth; - private saveEffects; - private addEffect; - private isEmpty; + protected saveHealth(pmcData: IPmcData, sessionID: string): void; + protected saveEffects(pmcData: IPmcData, sessionID: string): void; + protected addEffect(pmcData: IPmcData, sessionID: string, effect: { + bodyPart: string; + effectType: string; + }): void; + protected isEmpty(map: any): boolean; } diff --git a/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts index d6a4414..76b337f 100644 --- a/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts @@ -1,10 +1,12 @@ -import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData"; +import { Upd } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class HideoutHelper { - private logger; - private hashUtil; - private timeUtil; - private randomUtil; - private databaseServer; - private itemEventRouter; - private httpResponse; - private profileHelper; - private inventoryHelper; - private playerService; - private configServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected profileHelper: ProfileHelper; + protected inventoryHelper: InventoryHelper; + protected playerService: PlayerService; + protected configServer: ConfigServer; static BITCOIN_FARM: string; - private WATER_COLLECTOR; - private BITCOIN; - private EXPEDITIONARY_FUEL_TANK; + protected WATER_COLLECTOR: string; + protected BITCOIN: string; + protected EXPEDITIONARY_FUEL_TANK: string; static NAME_BACKENDCOUNTERS_CRAFTING: string; static SKILL_NAME_HIDEOUT: string; static HOUR_FOR_SKILL_CRAFTING: number; static SKILL_NAME_CRAFITING: string; - private hideoutConfig; + protected hideoutConfig: IHideoutConfig; constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer); registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /** @@ -46,20 +48,20 @@ export declare class HideoutHelper { initProduction(recipeId: string, productionTime: number): Production; isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; - private applySkillXPBoost; + protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void; updatePlayerHideout(sessionID: string): void; - private updateWaterCollector; - private doesWaterCollectorHaveFilter; - private updateFuel; - private updateWaterFilters; - private getAreaUpdObject; - private updateAirFilters; - private updateBitcoinFarm; - private getBTCSlots; - private getManagementSkillsSlots; - private hasManagementSkillSlots; - private getHideoutManagementSkill; - private getHideoutManagementConsumptionBonus; + protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void; + protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean; + protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea; + protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd; + protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea; + protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production; + protected getBTCSlots(pmcData: IPmcData): number; + protected getManagementSkillsSlots(): number; + protected hasManagementSkillSlots(pmcData: IPmcData): boolean; + protected getHideoutManagementSkill(pmcData: IPmcData): Common; + protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; isProduction(productive: Productive): productive is Production; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number; diff --git a/TypeScript/9RouterHooks/types/helpers/HttpServerHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HttpServerHelper.d.ts index 2e40814..c6e5296 100644 --- a/TypeScript/9RouterHooks/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HttpServerHelper.d.ts @@ -1,8 +1,19 @@ +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { ConfigServer } from "../servers/ConfigServer"; export declare class HttpServerHelper { - private configServer; - private httpConfig; - private mime; + protected configServer: ConfigServer; + protected httpConfig: IHttpConfig; + protected mime: { + css: string; + bin: string; + html: string; + jpg: string; + js: string; + json: string; + png: string; + svg: string; + txt: string; + }; constructor(configServer: ConfigServer); getMimeText(key: string): string; buildUrl(): string; diff --git a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts index e79d384..05b6fdf 100644 --- a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts @@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { PaymentHelper } from "./PaymentHelper"; export declare class InRaidHelper { - private logger; - private saveServer; - private jsonUtil; - private databaseServer; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected saveServer: SaveServer; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); - private removePlayer; - private removeMapAccessKey; + protected removePlayer(sessionID: string): void; + protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void; addUpdToMoneyFromRaid(items: Item[]): void; /** * Add positive karma for PMC kills diff --git a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts index 00e95d3..dc7cbca 100644 --- a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts @@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; +import { IInventoryConfig } from "../models/spt/config/IInventoryConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -25,26 +26,26 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class InventoryHelper { - private logger; - private jsonUtil; - private hashUtil; - private httpResponse; - private fenceService; - private databaseServer; - private paymentHelper; - private traderAssortHelper; - private dialogueHelper; - private itemHelper; - private containerHelper; - private profileHelper; - private configServer; - private inventoryConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected httpResponse: HttpResponseUtil; + protected fenceService: FenceService; + protected databaseServer: DatabaseServer; + protected paymentHelper: PaymentHelper; + protected traderAssortHelper: TraderAssortHelper; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected containerHelper: ContainerHelper; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer); addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record; - private getSizeByInventoryItemHash; - private getInventoryItemHash; + protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record; + protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash; getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][]; /** * Based on the item action, determine whose inventories we should be looking at for from and to. @@ -56,9 +57,9 @@ export declare class InventoryHelper { * @param {string} sessionID * @returns Array */ - private getStashSlotMap; - private getStashType; - private getPlayerStashSize; + protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; + protected getStashType(sessionID: string): string; + protected getPlayerStashSize(sessionID: string): Record; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. @@ -73,5 +74,12 @@ export declare class InventoryHelper { /** * Internal helper function to handle cartridges in inventory if any of them exist. */ - private handleCartridges; + protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void; } +declare namespace InventoryHelper { + interface InventoryItemHash { + byItemId: Record; + byParentId: Record; + } +} +export {}; diff --git a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts index 5ff64b6..70c88d6 100644 --- a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts @@ -1,15 +1,15 @@ import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; -import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; declare class ItemHelper { - private logger; - private hashUtil; - private jsonUtil; - private databaseServer; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer); /** * Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash @@ -82,7 +82,7 @@ declare class ItemHelper { * @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of * @returns {array} The array of StackSlotItems */ - generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[]; + generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[]; getItem(tpl: string): [boolean, ITemplateItem]; getItemQualityModifier(item: Item): number; findAndReturnChildrenByItems(items: Item[], itemID: string): string[]; diff --git a/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts index b9298da..34e62d9 100644 --- a/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts @@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { NotificationService } from "../services/NotificationService"; export declare class NotificationSendHelper { - private httpServer; - private notificationService; + protected httpServer: IHttpServer; + protected notificationService: NotificationService; constructor(httpServer: IHttpServer, notificationService: NotificationService); /** * Send notification message to the appropiate channel diff --git a/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts index 0d524e9..738b69a 100644 --- a/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts @@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile"; import { HttpServerHelper } from "./HttpServerHelper"; export declare class NotifierHelper { - private httpServerHelper; + protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - private defaultNotification; + protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ diff --git a/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts index 0a24128..0371886 100644 --- a/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts @@ -1,8 +1,8 @@ import { Preset } from "../models/eft/common/IGlobals"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PresetHelper { - private databaseServer; - private lookup; + protected databaseServer: DatabaseServer; + protected lookup: Record; constructor(databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; isPreset(id: string): boolean; diff --git a/TypeScript/9RouterHooks/types/helpers/ProbabilityHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ProbabilityHelper.d.ts new file mode 100644 index 0000000..7a0676c --- /dev/null +++ b/TypeScript/9RouterHooks/types/helpers/ProbabilityHelper.d.ts @@ -0,0 +1,14 @@ +import { ILogger } from "../models/spt/utils/ILogger"; +import { RandomUtil } from "../utils/RandomUtil"; +export declare class ProbabilityHelper { + protected logger: ILogger; + protected randomUtil: RandomUtil; + constructor(logger: ILogger, randomUtil: RandomUtil); + /** + * Chance to roll a number out of 100 + * @param chance Percentage chance roll should success + * @param scale scale of chance to allow support of numbers > 1-100 + * @returns true if success + */ + rollChance(chance: number, scale?: number): boolean; +} diff --git a/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts index 508443c..6a64291 100644 --- a/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts @@ -28,6 +28,6 @@ export declare class ProfileHelper { getPmcProfile(sessionID: string): IPmcData; getScavProfile(sessionID: string): IPmcData; getDefaultCounters(): Stats; - private isWiped; - private getServerVersion; + protected isWiped(sessionID: string): boolean; + protected getServerVersion(): string; } diff --git a/TypeScript/9RouterHooks/types/helpers/QuestConditionHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/QuestConditionHelper.d.ts index 2a0ee94..90ee560 100644 --- a/TypeScript/9RouterHooks/types/helpers/QuestConditionHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/QuestConditionHelper.d.ts @@ -3,5 +3,5 @@ export declare class QuestConditionHelper { getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; - private filterConditions; + protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[]; } diff --git a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts index 9e2dd5e..04ede16 100644 --- a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts @@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { TraderHelper } from "./TraderHelper"; export declare class QuestHelper { - private logger; - private jsonUtil; - private timeUtil; - private hashUtil; - private itemHelper; - private itemEventRouter; - private databaseServer; - private ragfairServerHelper; - private dialogueHelper; - private profileHelper; - private paymentHelper; - private traderHelper; - private configServer; - private questConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemHelper: ItemHelper; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected ragfairServerHelper: RagfairServerHelper; + protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected traderHelper: TraderHelper; + protected configServer: ConfigServer; + protected questConfig: IQuestConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); static get STATUS(): Record; questStatus(pmcData: IPmcData, questID: string): string; @@ -47,7 +48,7 @@ export declare class QuestHelper { */ dumpQuests(quests: any, label?: any): void; loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean; - private processReward; + protected processReward(reward: Reward): any[]; getQuestRewardItems(quest: IQuest, state: string): Reward[]; addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void; acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[]; @@ -56,13 +57,30 @@ export declare class QuestHelper { changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void; /** * Get List of All Quests as an array + * @returns Array of IQuest objects */ questValues(): IQuest[]; - private cleanQuestList; + /** + * Reest AvailableForStart conditions for quests + * @param quests queststo clean + * @returns quest array without conditions + */ + protected cleanQuestList(quests: IQuest[]): IQuest[]; + /** + * Reset AvailableForStart conditions on a quest + * @param quest quest to clean + * @returns reset IQuest object + */ cleanQuestConditions(quest: IQuest): IQuest; failQuest(pmcData: IPmcData, body: any, sessionID: string): any; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestLocaleIdFromDb(messageId: string, localisation?: string): string; - applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[]; + applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[]; + /** + * Get the intel center bonus a player has + * @param pmcData player profile + * @returns bonus in percent + */ + protected getIntelCenterRewardBonus(pmcData: IPmcData): number; getFindItemIdForQuestItem(itemTpl: string): string; } diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts index 8e70bcd..2c8dbb5 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts @@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper"; import { TraderAssortHelper } from "./TraderAssortHelper"; import { UtilityHelper } from "./UtilityHelper"; export declare class RagfairHelper { - private logger; - private jsonUtil; - private traderAssortHelper; - private databaseServer; - private handbookHelper; - private itemHelper; - private ragfairLinkedItemService; - private utilityHelper; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected traderAssortHelper: TraderAssortHelper; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected ragfairLinkedItemService: RagfairLinkedItemService; + protected utilityHelper: UtilityHelper; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); /** * Gets currency TAG from TPL @@ -31,7 +32,7 @@ export declare class RagfairHelper { getCurrencyTag(currency: string): string; filterCategories(sessionID: string, info: ISearchRequestData): string[]; getDisplayableAssorts(sessionID: string): Record; - private getCategoryList; + protected getCategoryList(handbookId: string): string[]; countCategories(result: IGetOffersResult): void; /** * Merges Root Items @@ -39,5 +40,4 @@ export declare class RagfairHelper { */ mergeStackable(items: Item[]): Item[]; getCurrencySymbol(currencyTpl: string): string; - formatCurrency(moneyAmount: number): string; } diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts index 3bf8add..129bc1c 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts @@ -1,7 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper"; import { RagfairServerHelper } from "./RagfairServerHelper"; import { RagfairSortHelper } from "./RagfairSortHelper"; export declare class RagfairOfferHelper { - private logger; - private timeUtil; - private hashUtil; - private itemEventRouter; - private databaseServer; - private saveServer; - private dialogueHelper; - private itemHelper; - private paymentHelper; - private presetHelper; - private profileHelper; - private ragfairServerHelper; - private ragfairSortHelper; - private ragfairHelper; - private ragfairOfferService; - private configServer; - private static TPL_GOODS_SOLD; - private ragfairConfig; - private questConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected hashUtil: HashUtil; + protected itemEventRouter: ItemEventRouter; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected dialogueHelper: DialogueHelper; + protected itemHelper: ItemHelper; + protected paymentHelper: PaymentHelper; + protected presetHelper: PresetHelper; + protected profileHelper: ProfileHelper; + protected ragfairServerHelper: RagfairServerHelper; + protected ragfairSortHelper: RagfairSortHelper; + protected ragfairHelper: RagfairHelper; + protected ragfairOfferService: RagfairOfferService; + protected configServer: ConfigServer; + protected static TPL_GOODS_SOLD: string; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer); getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, pmcProfile: IPmcData): IRagfairOffer[]; processOffers(sessionID: string): boolean; - private getProfileOffers; - private deleteOfferByOfferId; - private completeOffer; + protected getProfileOffers(sessionID: string): IRagfairOffer[]; + protected deleteOfferByOfferId(sessionID: string, offerId: string): void; + protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse; isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record, offer: IRagfairOffer, pmcProfile: IPmcData): boolean; } diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairSellHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairSellHelper.d.ts index 929d112..6ec004a 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairSellHelper.d.ts @@ -1,14 +1,15 @@ import { SellResult } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairSellHelper { - private logger; - private randomUtil; - private timeUtil; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer); calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number; rollForSale(sellChance: number, count: number): SellResult[]; diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts index d29ba42..2cb3ea5 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts @@ -1,6 +1,8 @@ import { MemberCategory } from "../models/enums/MemberCategory"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; @@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class RagfairServerHelper { - private randomUtil; - private hashUtil; - private saveServer; - private databaseServer; - private profileHelper; - private itemHelper; - private dialogueHelper; - private jsonUtil; - private configServer; - private ragfairConfig; - private questConfig; - private static TPL_GOODS_RETURNED; + protected randomUtil: RandomUtil; + protected hashUtil: HashUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected itemHelper: ItemHelper; + protected dialogueHelper: DialogueHelper; + protected jsonUtil: JsonUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected questConfig: IQuestConfig; + protected static TPL_GOODS_RETURNED: string; constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item @@ -30,7 +32,7 @@ export declare class RagfairServerHelper { * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - private isItemBlacklisted; + protected isItemBlacklisted(itemTemplateId: string): boolean; isTrader(userID: string): boolean; isPlayer(userID: string): boolean; returnItems(sessionID: string, items: any[]): void; diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairSortHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairSortHelper.d.ts index e9d8069..e983569 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairSortHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairSortHelper.d.ts @@ -1,12 +1,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class RagfairSortHelper { - private databaseServer; + protected databaseServer: DatabaseServer; constructor(databaseServer: DatabaseServer); sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[]; - private sortOffersByID; - private sortOffersByRating; - private sortOffersByName; - private sortOffersByPrice; - private sortOffersByExpiry; + protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number; + protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number; } diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts index e87334f..820facb 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts @@ -1,15 +1,16 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { - private logger; - private databaseServer; - private ragfairPriceService; - private itemHelper; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected ragfairPriceService: RagfairPriceService; + protected itemHelper: ItemHelper; constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper); calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number; - private calculateItemWorth; + protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number; } diff --git a/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts index 47123e1..545108e 100644 --- a/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts @@ -1,20 +1,21 @@ -import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; +import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem"; +import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RepairHelper { - private logger; - private jsonUtil; - private randomUtil; - private databaseServer; - private configServer; - private repairConfig; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected configServer: ConfigServer; + protected repairConfig: IRepairConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); - updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item; - private getRandomisedArmorRepairDegredationValue; - private getRandomisedWeaponRepairDegredationValue; + updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item; + protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number; + protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number; isWeaponTemplate(tpl: string): boolean; } diff --git a/TypeScript/9RouterHooks/types/helpers/SecureContainerHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/SecureContainerHelper.d.ts index 8f246b6..9e2bc32 100644 --- a/TypeScript/9RouterHooks/types/helpers/SecureContainerHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/SecureContainerHelper.d.ts @@ -7,7 +7,7 @@ export interface OwnerInventoryItems { isMail: boolean; } export declare class SecureContainerHelper { - private itemHelper; + protected itemHelper: ItemHelper; constructor(itemHelper: ItemHelper); getSecureContainerItems(items: Item[]): string[]; } diff --git a/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts index 475390b..975062b 100644 --- a/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts @@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { Upd } from "../models/eft/common/tables/IItem"; +import { Item, Upd } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer"; import { FenceService } from "../services/FenceService"; import { PaymentService } from "../services/PaymentService"; export declare class TradeHelper { - private logger; - private itemEventRouter; - private traderHelper; - private itemHelper; - private paymentService; - private fenceService; - private inventoryHelper; - private ragfairServer; + protected logger: ILogger; + protected itemEventRouter: ItemEventRouter; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected paymentService: PaymentService; + protected fenceService: FenceService; + protected inventoryHelper: InventoryHelper; + protected ragfairServer: RagfairServer; constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); /** * Buy item from flea or trader @@ -39,6 +39,6 @@ export declare class TradeHelper { * @returns */ sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; - private incrementAssortBuyCount; - private checkPurchaseIsWithinTraderItemLimit; + protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void; + protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void; } diff --git a/TypeScript/9RouterHooks/types/helpers/TraderAssortHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/TraderAssortHelper.d.ts index d95879c..4f41ac2 100644 --- a/TypeScript/9RouterHooks/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/TraderAssortHelper.d.ts @@ -1,7 +1,8 @@ -import { ITraderAssort } from "../models/eft/common/tables/ITrader"; -import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; +import { Item } from "../models/eft/common/tables/IItem"; +import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { FenceService } from "../services/FenceService"; import { TraderAssortService } from "../services/TraderAssortService"; @@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil"; import { AssortHelper } from "./AssortHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderAssortHelper { - private logger; - private jsonUtil; - private databaseServer; - private profileHelper; - private assortHelper; - private ragfairAssortGenerator; - private ragfairOfferGenerator; - private traderAssortService; - private fenceService; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected profileHelper: ProfileHelper; + protected assortHelper: AssortHelper; + protected ragfairAssortGenerator: RagfairAssortGenerator; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected traderAssortService: TraderAssortService; + protected fenceService: FenceService; constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService); + /** + * Get a traders assorts + * Can be used for returning ragfair / fence assorts + * @param sessionId session id + * @param traderId trader id + * @returns a traders assorts + */ getAssort(sessionId: string, traderId: string): ITraderAssort; + /** + * Get an array of pristine trader items prior to any alteration by player + * @param traderId trader id + * @returns array of Items + */ + protected getPristineTraderAssorts(traderId: string): Item[]; + /** + * Returns generated ragfair offers in a trader assort format + * @returns Trader assort object + */ + protected getRagfairDataAsTraderAssort(): ITraderAssort; } diff --git a/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts index ec64d59..ab4a371 100644 --- a/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { IBarterScheme, ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,25 +12,42 @@ import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; import { ProfileHelper } from "./ProfileHelper"; export declare class TraderHelper { - private logger; - private databaseServer; - private saveServer; - private profileHelper; - private paymentHelper; - private itemHelper; - private handbookHelper; - private playerService; - private fenceService; - private configServer; - private traderConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected profileHelper: ProfileHelper; + protected paymentHelper: PaymentHelper; + protected itemHelper: ItemHelper; + protected handbookHelper: HandbookHelper; + protected playerService: PlayerService; + protected fenceService: FenceService; + protected configServer: ConfigServer; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, configServer: ConfigServer); getTrader(traderID: string, sessionID: string): ITraderBase; getTraderAssortsById(traderId: string): ITraderAssort; + /** + * Reset a trader back to its initial state as seen by a level 1 player + * Does NOT take into account different profile levels + * @param sessionID session id + * @param traderID trader id to reset + */ resetTrader(sessionID: string, traderID: string): void; changeTraderDisplay(traderID: string, status: boolean, sessionID: string): void; getPurchasesData(traderID: string, sessionID: string): Record; + /** + * Calculate traders level based on exp amount and increment level if over threshold + * @param traderID trader to process + * @param sessionID session id + */ lvlUp(traderID: string, sessionID: string): void; getTraderUpdateSeconds(traderId: string): number; + /** + * check if an item is allowed to be sold to a trader + * @param traderFilters array of allowed categories + * @param tplToCheck itemTpl of inventory + * @returns boolean + */ traderFilter(traderFilters: string[], tplToCheck: string): boolean; getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel; } diff --git a/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts b/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts index 4f7664c..06ad698 100644 --- a/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts +++ b/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts @@ -10,10 +10,10 @@ declare class BundleInfo { constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string); } export declare class BundleLoader { - private httpServerHelper; - private vfs; - private jsonUtil; - private bundles; + protected httpServerHelper: HttpServerHelper; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; diff --git a/TypeScript/9RouterHooks/types/loaders/DelayedModLoader.d.ts b/TypeScript/9RouterHooks/types/loaders/DelayedModLoader.d.ts index 7d0009f..2a05604 100644 --- a/TypeScript/9RouterHooks/types/loaders/DelayedModLoader.d.ts +++ b/TypeScript/9RouterHooks/types/loaders/DelayedModLoader.d.ts @@ -1,3 +1,4 @@ +import { DependencyContainer } from "tsyringe"; import { HandbookController } from "../controllers/HandbookController"; import { IModLoader } from "../models/spt/mod/IModLoader"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -5,17 +6,16 @@ import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; import { InitialModLoader } from "./InitialModLoader"; export declare class DelayedModLoader implements IModLoader { - private bundleLoader; - private handbookController; - private vfs; - private modCompilerService; - private initialModLoader; + protected bundleLoader: BundleLoader; + protected handbookController: HandbookController; + protected vfs: VFS; + protected modCompilerService: ModCompilerService; + protected initialModLoader: InitialModLoader; constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; load(): void; - private executeMods; - private addBundles; + protected executeMods(container: DependencyContainer): void; + protected addBundles(): void; } diff --git a/TypeScript/9RouterHooks/types/loaders/InitialModLoader.d.ts b/TypeScript/9RouterHooks/types/loaders/InitialModLoader.d.ts index 5957d35..68e47fe 100644 --- a/TypeScript/9RouterHooks/types/loaders/InitialModLoader.d.ts +++ b/TypeScript/9RouterHooks/types/loaders/InitialModLoader.d.ts @@ -1,5 +1,8 @@ import { DependencyContainer } from "tsyringe"; +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; +import { ModLoader } from "../models/spt/mod/IMod"; import { IModLoader } from "../models/spt/mod/IModLoader"; +import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { ModCompilerService } from "../services/ModCompilerService"; @@ -7,52 +10,55 @@ import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; import { BundleLoader } from "./BundleLoader"; export declare class InitialModLoader implements IModLoader { - private logger; - private vfs; - private jsonUtil; - private modCompilerService; - private bundleLoader; - private configServer; - private static container; - private readonly basepath; - private imported; - private onLoad; - private akiConfig; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected modCompilerService: ModCompilerService; + protected bundleLoader: BundleLoader; + protected configServer: ConfigServer; + protected static container: DependencyContainer; + protected readonly basepath = "user/mods/"; + protected imported: Record; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer); load(container: DependencyContainer): Promise; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; + /** + * Returns a list of mods with preserved load order + * @returns Array of mod names in load order + */ getImportedModsNames(): string[]; getModPath(mod: string): string; - private importClass; - private importMods; + protected importClass(name: string, filepath: string, container: DependencyContainer): void; + protected importMods(): Promise; /** * * @param mods Get an array of broken/invalid mods by name * @returns Mod names array */ - private getBrokenMods; + protected getBrokenMods(mods: string[]): string[]; /** * Get packageJson data for mods * @param mods mods to get packageJson for * @returns dictionary */ - private getModsPackageData; + protected getModsPackageData(mods: string[]): Record; /** * Does mod have "delayedLoad(" string in its entry class * @param modFolderName folder name * @param modToValidate package.json details * @returns boolean */ - private isModSpt300Compatible; - private isModCombatibleWithAki; - private executeMods; - private sortModsLoadOrder; - private addMod; - private areModDependenciesFulfilled; - private isModCompatible; - private validMod; - private getLoadOrderRecursive; - private getLoadOrder; + protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; + protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; + protected executeMods(container: DependencyContainer): void; + sortModsLoadOrder(): string[]; + protected addMod(mod: string): Promise; + protected areModDependenciesFulfilled(mod: IPackageJsonData, loadedMods: Record): boolean; + protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; + protected validMod(mod: string): boolean; + protected getLoadOrderRecursive(mod: string, result: Record, visited: Record): void; + protected getLoadOrder(mods: Record): Record; getContainer(): DependencyContainer; } diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts index c2ba762..a7c7370 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts @@ -87,7 +87,7 @@ export interface Props { defAmmo: string; AdjustCollimatorsToTrajectory: boolean; shotgunDispersion: number; - Chambers: Chamber[]; + Chambers: Slot[]; CameraRecoil: number; CameraSnap: number; ReloadMode: string; @@ -221,7 +221,7 @@ export interface Props { ShowHitEffectOnExplode: boolean; ExplosionType: string; AmmoLifeTimeSec: number; - Contusion: Contusion; + Contusion: Xyz; ArmorDistanceDistanceDamage: Xyz; Blindness: Xyz; IsLightAndSoundShot: boolean; @@ -244,7 +244,7 @@ export interface Props { HasShoulderContact: boolean; DoubleActionAccuracyPenaltyMult: number; magAnimationIndex: number; - Cartridges: Cartridge[]; + Cartridges: Slot[]; CanFast: boolean; CanHit: boolean; CanAdmin: boolean; @@ -285,6 +285,25 @@ export interface Props { TargetItemFilter: string[]; apResource: number; krResource: number; + BlocksEarpiece?: boolean; + BlocksEyewear?: boolean; + BlocksHeadwear?: boolean; + BlocksFaceCover?: boolean; + Distortion?: number; + CompressorTreshold?: number; + CompressorAttack?: number; + CompressorRelease?: number; + CompressorGain?: number; + CutoffFreq?: number; + Resonance?: number; + CompressorVolume?: number; + AmbientVolume?: number; + DryVolume?: number; + headSegments?: string[]; + FaceShieldComponent?: boolean; + RicochetParams?: Xyz; + DeafStrength?: string; + BlindnessProtection: number; } export interface Prefab { path: string; @@ -315,27 +334,18 @@ export interface Slot { _id: string; _parent: string; _props: SlotProps; + _max_count?: number; _required: boolean; _mergeSlotWithChildren: boolean; _proto: string; } export interface SlotProps { - filters: Filter[]; + filters: SlotFilter[]; } -export interface Chamber { - _name: string; - _id: string; - _parent: string; - _props: ChamberProps; - _required: boolean; - _mergeSlotWithChildren: boolean; - _proto: string; -} -export interface ChamberProps { - filters: FilterProps[]; -} -export interface FilterProps { +export interface SlotFilter { + Shift?: number; Filter: string[]; + AnimationIndex?: number; } export interface Xyz { x: number; @@ -345,53 +355,38 @@ export interface Xyz { export interface StackSlot { _name?: string; _id: string; - _sptTpl: string; - parent: string; - location: any; - slotId: string; + _parent: string; _max_count: number; - _props?: StackSlotProps; - _proto?: string; + _props: StackSlotProps; + _proto: string; upd: any; } export interface StackSlotProps { - filters: Filter[]; + filters: SlotFilter[]; } export interface EffectsHealth { - Hydration: Hydration; + Energy: EffectsHealthProps; + Hydration: EffectsHealthProps; } -export interface Hydration { +export interface EffectsHealthProps { value: number; } export interface EffectsDamage { - Pain: Pain; - Contusion: Contusion; + Pain: EffectDamageProps; + LightBleeding: EffectDamageProps; + HeavyBleeding: EffectDamageProps; + Contusion: EffectDamageProps; + RadExposure: EffectDamageProps; + Fracture: EffectDamageProps; + DestroyedPart: EffectDamageProps; } -export interface Pain { +export interface EffectDamageProps { delay: number; duration: number; fadeOut: number; -} -export interface Contusion { - delay: number; - duration: number; - fadeOut: number; -} -export interface Cartridge { - _name: string; - _id: string; - _parent: string; - _max_count: number; - _props: CartridgeProps; - _proto: string; -} -export interface CartridgeProps { - filters: Filter[]; -} -export interface Filter { - Shift?: number; - Filter: string[]; - AnimationIndex?: number; + cost?: number; + healthPenaltyMin?: number; + healthPenaltyMax?: number; } export interface Color { r: number; diff --git a/TypeScript/9RouterHooks/types/models/enums/QuestStatus.d.ts b/TypeScript/9RouterHooks/types/models/enums/QuestStatus.d.ts new file mode 100644 index 0000000..6335c73 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/QuestStatus.d.ts @@ -0,0 +1,10 @@ +export declare enum QuestStatus { + Locked = 0, + AvailableForStart = 1, + Started = 2, + AvailableForFinish = 3, + Success = 4, + Fail = 5, + FailRestartable = 6, + MarkedAsFailed = 7 +} diff --git a/TypeScript/9RouterHooks/types/models/spt/mod/IModLoader.d.ts b/TypeScript/9RouterHooks/types/models/spt/mod/IModLoader.d.ts index 5398c9b..40a5e19 100644 --- a/TypeScript/9RouterHooks/types/models/spt/mod/IModLoader.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/mod/IModLoader.d.ts @@ -3,6 +3,5 @@ export interface IModLoader { load(container: DependencyContainer): void; getBundles(local: boolean): string; getBundle(key: string, local: boolean): void; - getImportedModsNames(): string[]; getModPath(mod: string): string; } diff --git a/TypeScript/9RouterHooks/types/models/spt/server/ILocaleBase.d.ts b/TypeScript/9RouterHooks/types/models/spt/server/ILocaleBase.d.ts index a20084d..8887c06 100644 --- a/TypeScript/9RouterHooks/types/models/spt/server/ILocaleBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/server/ILocaleBase.d.ts @@ -1,5 +1,5 @@ export interface ILocaleBase { - global: ILocaleGlobalBase; + global: Record; menu: Record; languages: ILanguageBase[]; } diff --git a/TypeScript/9RouterHooks/types/routers/HttpRouter.d.ts b/TypeScript/9RouterHooks/types/routers/HttpRouter.d.ts index 44edc0b..f75a47d 100644 --- a/TypeScript/9RouterHooks/types/routers/HttpRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/HttpRouter.d.ts @@ -1,11 +1,16 @@ /// import { IncomingMessage } from "http"; -import { DynamicRouter, StaticRouter } from "../di/Router"; +import { DynamicRouter, Router, StaticRouter } from "../di/Router"; export declare class HttpRouter { - private staticRouters; - private dynamicRoutes; + protected staticRouters: StaticRouter[]; + protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); - private groupBy; + protected groupBy(list: T[], keyGetter: (t: T) => string): Map; getResponse(req: IncomingMessage, info: any, sessionID: string): string; - private handleRoute; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; } +declare class ResponseWrapper { + output: string; + constructor(output: string); +} +export {}; diff --git a/TypeScript/9RouterHooks/types/routers/ImageRouter.d.ts b/TypeScript/9RouterHooks/types/routers/ImageRouter.d.ts index 97e580d..ab03977 100644 --- a/TypeScript/9RouterHooks/types/routers/ImageRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/ImageRouter.d.ts @@ -4,8 +4,8 @@ import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ImageRouteService } from "../services/mod/image/ImageRouteService"; import { VFS } from "../utils/VFS"; export declare class ImageRouter { - private vfs; - private imageRouteService; + protected vfs: VFS; + protected imageRouteService: ImageRouteService; constructor(vfs: VFS, imageRouteService: ImageRouteService); addRoute(key: string, valueToAdd: string): void; sendImage(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any, httpServer: IHttpServer): void; diff --git a/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts index bb20152..b1ac5d9 100644 --- a/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts @@ -5,13 +5,13 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { ItemEventRouterDefinition } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class ItemEventRouter { - private logger; - private jsonUtil; - private profileHelper; - private itemEventRouters; + protected logger: ILogger; + protected jsonUtil: JsonUtil; + protected profileHelper: ProfileHelper; + protected itemEventRouters: ItemEventRouterDefinition[]; constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); - private output; + protected output: IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; - private resetOutput; + protected resetOutput(sessionID: string): void; } diff --git a/TypeScript/9RouterHooks/types/routers/dynamic/BotDynamicRouter.d.ts b/TypeScript/9RouterHooks/types/routers/dynamic/BotDynamicRouter.d.ts index dd2f68a..6d0ab4b 100644 --- a/TypeScript/9RouterHooks/types/routers/dynamic/BotDynamicRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/dynamic/BotDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BotDynamicRouter extends DynamicRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/dynamic/BundleDynamicRouter.d.ts b/TypeScript/9RouterHooks/types/routers/dynamic/BundleDynamicRouter.d.ts index be27008..a765410 100644 --- a/TypeScript/9RouterHooks/types/routers/dynamic/BundleDynamicRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/dynamic/BundleDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class BundleDynamicRouter extends DynamicRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/dynamic/CustomizationDynamicRouter.d.ts b/TypeScript/9RouterHooks/types/routers/dynamic/CustomizationDynamicRouter.d.ts index 03a5967..2db7cc5 100644 --- a/TypeScript/9RouterHooks/types/routers/dynamic/CustomizationDynamicRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/dynamic/CustomizationDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class CustomizationDynamicRouter extends DynamicRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/dynamic/DataDynamicRouter.d.ts b/TypeScript/9RouterHooks/types/routers/dynamic/DataDynamicRouter.d.ts index c30501a..836ed8d 100644 --- a/TypeScript/9RouterHooks/types/routers/dynamic/DataDynamicRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/dynamic/DataDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class DataDynamicRouter extends DynamicRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/dynamic/HttpDynamicRouter.d.ts b/TypeScript/9RouterHooks/types/routers/dynamic/HttpDynamicRouter.d.ts index b2933e9..a152b4d 100644 --- a/TypeScript/9RouterHooks/types/routers/dynamic/HttpDynamicRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/dynamic/HttpDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { DynamicRouter } from "../../di/Router"; import { ImageRouter } from "../ImageRouter"; export declare class HttpDynamicRouter extends DynamicRouter { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); } diff --git a/TypeScript/9RouterHooks/types/routers/dynamic/InraidDynamicRouter.d.ts b/TypeScript/9RouterHooks/types/routers/dynamic/InraidDynamicRouter.d.ts index ea4a9ae..7c0561f 100644 --- a/TypeScript/9RouterHooks/types/routers/dynamic/InraidDynamicRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/dynamic/InraidDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class InraidDynamicRouter extends DynamicRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/9RouterHooks/types/routers/dynamic/LocationDynamicRouter.d.ts b/TypeScript/9RouterHooks/types/routers/dynamic/LocationDynamicRouter.d.ts index 30741db..b8e5cdf 100644 --- a/TypeScript/9RouterHooks/types/routers/dynamic/LocationDynamicRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/dynamic/LocationDynamicRouter.d.ts @@ -1,7 +1,7 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class LocationDynamicRouter extends DynamicRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); getTopLevelRoute(): string; } diff --git a/TypeScript/9RouterHooks/types/routers/dynamic/NotifierDynamicRouter.d.ts b/TypeScript/9RouterHooks/types/routers/dynamic/NotifierDynamicRouter.d.ts index 4786817..83c60c5 100644 --- a/TypeScript/9RouterHooks/types/routers/dynamic/NotifierDynamicRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/dynamic/NotifierDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class NotifierDynamicRouter extends DynamicRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/dynamic/TraderDynamicRouter.d.ts b/TypeScript/9RouterHooks/types/routers/dynamic/TraderDynamicRouter.d.ts index a100b4c..5b7cc1b 100644 --- a/TypeScript/9RouterHooks/types/routers/dynamic/TraderDynamicRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/dynamic/TraderDynamicRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { DynamicRouter } from "../../di/Router"; export declare class TraderDynamicRouter extends DynamicRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/CustomizationItemEventRouter.d.ts index 3025e2c..e78445e 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/HealthItemEventRouter.d.ts index bad9af2..99847c6 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/HealthItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HealthItemEventRouter extends ItemEventRouterDefinition { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/HideoutItemEventRouter.d.ts index 2cec18b..e1e98af 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { - private hideoutCallbacks; + protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/InsuranceItemEventRouter.d.ts index 8efc2c2..a922cc0 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/InventoryItemEventRouter.d.ts index 1d93e7b..2619bb9 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { - private inventoryCallbacks; + protected inventoryCallbacks: InventoryCallbacks; constructor(inventoryCallbacks: InventoryCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/NoteItemEventRouter.d.ts index 12af594..59bf598 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/NoteItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { NoteCallbacks } from "../../callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class NoteItemEventRouter extends ItemEventRouterDefinition { - private noteCallbacks; + protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/routers/item_events/PresetBuildItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/PresetBuildItemEventRouter.d.ts index 7298c52..277db44 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/PresetBuildItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/PresetBuildItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition { - private presetBuildCallbacks; + protected presetBuildCallbacks: PresetBuildCallbacks; constructor(presetBuildCallbacks: PresetBuildCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/QuestItemEventRouter.d.ts index 9944ae9..a092aa6 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/QuestItemEventRouter.d.ts @@ -1,10 +1,12 @@ -import { IPmcData } from "../../models/eft/common/IPmcData"; -import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; +import { IPmcData } from "../../models/eft/common/IPmcData"; +import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; +import { ILogger } from "../../models/spt/utils/ILogger"; export declare class QuestItemEventRouter extends ItemEventRouterDefinition { - private questCallbacks; - constructor(questCallbacks: QuestCallbacks); + protected logger: ILogger; + protected questCallbacks: QuestCallbacks; + constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/RagfairItemEventRouter.d.ts index 88e52ba..9216cc5 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/RepairItemEventRouter.d.ts index b292ded..5196ba9 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/RepairItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { RepairCallbacks } from "../../callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class RepairItemEventRouter extends ItemEventRouterDefinition { - private repairCallbacks; + protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/TradeItemEventRouter.d.ts index 1bca2b8..a43bb0a 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/TradeItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { TradeCallbacks } from "../../callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class TradeItemEventRouter extends ItemEventRouterDefinition { - private tradeCallbacks; + protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/WishlistItemEventRouter.d.ts index 38831f6..38497fb 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventR import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { - private wishlistCallbacks; + protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/routers/serializers/BundleSerializer.d.ts b/TypeScript/9RouterHooks/types/routers/serializers/BundleSerializer.d.ts index 7952e9c..912db83 100644 --- a/TypeScript/9RouterHooks/types/routers/serializers/BundleSerializer.d.ts +++ b/TypeScript/9RouterHooks/types/routers/serializers/BundleSerializer.d.ts @@ -3,8 +3,8 @@ import { BundleLoader } from "../../loaders/BundleLoader"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { ILogger } from "../../models/spt/utils/ILogger"; export declare class BundleSerializer extends Serializer { - private logger; - private bundleLoader; + protected logger: ILogger; + protected bundleLoader: BundleLoader; constructor(logger: ILogger, bundleLoader: BundleLoader); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/9RouterHooks/types/routers/serializers/ImageSerializer.d.ts b/TypeScript/9RouterHooks/types/routers/serializers/ImageSerializer.d.ts index 29340d0..0e040d4 100644 --- a/TypeScript/9RouterHooks/types/routers/serializers/ImageSerializer.d.ts +++ b/TypeScript/9RouterHooks/types/routers/serializers/ImageSerializer.d.ts @@ -2,7 +2,7 @@ import { IHttpServer } from "../../models/spt/server/IHttpServer"; import { Serializer } from "../../di/Serializer"; import { ImageRouter } from "../ImageRouter"; export declare class ImageSerializer extends Serializer { - private imageRouter; + protected imageRouter: ImageRouter; constructor(imageRouter: ImageRouter); serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; diff --git a/TypeScript/9RouterHooks/types/routers/serializers/NotifySerializer.d.ts b/TypeScript/9RouterHooks/types/routers/serializers/NotifySerializer.d.ts index 8be8ac2..1779ac9 100644 --- a/TypeScript/9RouterHooks/types/routers/serializers/NotifySerializer.d.ts +++ b/TypeScript/9RouterHooks/types/routers/serializers/NotifySerializer.d.ts @@ -3,9 +3,9 @@ import { Serializer } from "../../di/Serializer"; import { HttpServerHelper } from "../../helpers/HttpServerHelper"; import { IHttpServer } from "../../models/spt/server/IHttpServer"; export declare class NotifySerializer extends Serializer { - private notifierController; - private httpServerHelper; + protected notifierController: NotifierController; + protected httpServerHelper: HttpServerHelper; constructor(notifierController: NotifierController, httpServerHelper: HttpServerHelper); - serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; + serialize(_sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void; canHandle(route: string): boolean; } diff --git a/TypeScript/9RouterHooks/types/routers/static/BotStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/BotStaticRouter.d.ts index d8b0bf4..aeea220 100644 --- a/TypeScript/9RouterHooks/types/routers/static/BotStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/BotStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BotCallbacks } from "../../callbacks/BotCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BotStaticRouter extends StaticRouter { - private botCallbacks; + protected botCallbacks: BotCallbacks; constructor(botCallbacks: BotCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/BundleStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/BundleStaticRouter.d.ts index 3905b82..fb682fc 100644 --- a/TypeScript/9RouterHooks/types/routers/static/BundleStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/BundleStaticRouter.d.ts @@ -1,6 +1,6 @@ import { BundleCallbacks } from "../../callbacks/BundleCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class BundleStaticRouter extends StaticRouter { - private bundleCallbacks; + protected bundleCallbacks: BundleCallbacks; constructor(bundleCallbacks: BundleCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/CustomizationStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/CustomizationStaticRouter.d.ts index 46c71b8..21bc4bb 100644 --- a/TypeScript/9RouterHooks/types/routers/static/CustomizationStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/CustomizationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class CustomizationStaticRouter extends StaticRouter { - private customizationCallbacks; + protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/DataStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/DataStaticRouter.d.ts index a493d3a..84ba7fd 100644 --- a/TypeScript/9RouterHooks/types/routers/static/DataStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/DataStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DataCallbacks } from "../../callbacks/DataCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DataStaticRouter extends StaticRouter { - private dataCallbacks; + protected dataCallbacks: DataCallbacks; constructor(dataCallbacks: DataCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/DialogStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/DialogStaticRouter.d.ts index a59fb14..546cdf1 100644 --- a/TypeScript/9RouterHooks/types/routers/static/DialogStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/DialogStaticRouter.d.ts @@ -1,6 +1,6 @@ import { DialogueCallbacks } from "../../callbacks/DialogueCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class DialogStaticRouter extends StaticRouter { - private dialogueCallbacks; + protected dialogueCallbacks: DialogueCallbacks; constructor(dialogueCallbacks: DialogueCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/GameStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/GameStaticRouter.d.ts index 988b673..a9a7496 100644 --- a/TypeScript/9RouterHooks/types/routers/static/GameStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/GameStaticRouter.d.ts @@ -1,6 +1,6 @@ import { GameCallbacks } from "../../callbacks/GameCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class GameStaticRouter extends StaticRouter { - private gameCallbacks; + protected gameCallbacks: GameCallbacks; constructor(gameCallbacks: GameCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/HealthStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/HealthStaticRouter.d.ts index e644861..863fd5e 100644 --- a/TypeScript/9RouterHooks/types/routers/static/HealthStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/HealthStaticRouter.d.ts @@ -1,6 +1,6 @@ import { HealthCallbacks } from "../../callbacks/HealthCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class HealthStaticRouter extends StaticRouter { - private healthCallbacks; + protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/InraidStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/InraidStaticRouter.d.ts index 66ed860..b29ad23 100644 --- a/TypeScript/9RouterHooks/types/routers/static/InraidStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/InraidStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InraidCallbacks } from "../../callbacks/InraidCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InraidStaticRouter extends StaticRouter { - private inraidCallbacks; + protected inraidCallbacks: InraidCallbacks; constructor(inraidCallbacks: InraidCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/InsuranceStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/InsuranceStaticRouter.d.ts index 8da26b3..5676499 100644 --- a/TypeScript/9RouterHooks/types/routers/static/InsuranceStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/InsuranceStaticRouter.d.ts @@ -1,6 +1,6 @@ import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class InsuranceStaticRouter extends StaticRouter { - private insuranceCallbacks; + protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/ItemEventStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/ItemEventStaticRouter.d.ts index 08ba6bb..c30a7fc 100644 --- a/TypeScript/9RouterHooks/types/routers/static/ItemEventStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/ItemEventStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ItemEventCallbacks } from "../../callbacks/ItemEventCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ItemEventStaticRouter extends StaticRouter { - private itemEventCallbacks; + protected itemEventCallbacks: ItemEventCallbacks; constructor(itemEventCallbacks: ItemEventCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/LauncherStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/LauncherStaticRouter.d.ts index 9d07f78..0040cbd 100644 --- a/TypeScript/9RouterHooks/types/routers/static/LauncherStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/LauncherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LauncherCallbacks } from "../../callbacks/LauncherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LauncherStaticRouter extends StaticRouter { - private launcherCallbacks; + protected launcherCallbacks: LauncherCallbacks; constructor(launcherCallbacks: LauncherCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/LocationStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/LocationStaticRouter.d.ts index 9c5c52e..b6de956 100644 --- a/TypeScript/9RouterHooks/types/routers/static/LocationStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/LocationStaticRouter.d.ts @@ -1,6 +1,6 @@ import { LocationCallbacks } from "../../callbacks/LocationCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class LocationStaticRouter extends StaticRouter { - private locationCallbacks; + protected locationCallbacks: LocationCallbacks; constructor(locationCallbacks: LocationCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/MatchStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/MatchStaticRouter.d.ts index d746381..9920a92 100644 --- a/TypeScript/9RouterHooks/types/routers/static/MatchStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/MatchStaticRouter.d.ts @@ -1,6 +1,6 @@ import { MatchCallbacks } from "../../callbacks/MatchCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class MatchStaticRouter extends StaticRouter { - private matchCallbacks; + protected matchCallbacks: MatchCallbacks; constructor(matchCallbacks: MatchCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/NotifierStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/NotifierStaticRouter.d.ts index 1c8566d..8f1f5cc 100644 --- a/TypeScript/9RouterHooks/types/routers/static/NotifierStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/NotifierStaticRouter.d.ts @@ -1,6 +1,6 @@ import { NotifierCallbacks } from "../../callbacks/NotifierCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class NotifierStaticRouter extends StaticRouter { - private notifierCallbacks; + protected notifierCallbacks: NotifierCallbacks; constructor(notifierCallbacks: NotifierCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/PresetStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/PresetStaticRouter.d.ts index 2272f82..a9e7458 100644 --- a/TypeScript/9RouterHooks/types/routers/static/PresetStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/PresetStaticRouter.d.ts @@ -1,6 +1,6 @@ import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class PresetStaticRouter extends StaticRouter { - private presetCallbacks; + protected presetCallbacks: PresetBuildCallbacks; constructor(presetCallbacks: PresetBuildCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/ProfileStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/ProfileStaticRouter.d.ts index fd787f1..83403f2 100644 --- a/TypeScript/9RouterHooks/types/routers/static/ProfileStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/ProfileStaticRouter.d.ts @@ -1,6 +1,6 @@ import { ProfileCallbacks } from "../../callbacks/ProfileCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class ProfileStaticRouter extends StaticRouter { - private profileCallbacks; + protected profileCallbacks: ProfileCallbacks; constructor(profileCallbacks: ProfileCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/QuestStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/QuestStaticRouter.d.ts index fda3c23..8f7ca0a 100644 --- a/TypeScript/9RouterHooks/types/routers/static/QuestStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/QuestStaticRouter.d.ts @@ -1,6 +1,6 @@ import { QuestCallbacks } from "../../callbacks/QuestCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class QuestStaticRouter extends StaticRouter { - private questCallbacks; + protected questCallbacks: QuestCallbacks; constructor(questCallbacks: QuestCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/RagfairStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/RagfairStaticRouter.d.ts index 618374f..6c41467 100644 --- a/TypeScript/9RouterHooks/types/routers/static/RagfairStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/RagfairStaticRouter.d.ts @@ -1,6 +1,6 @@ import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class RagfairStaticRouter extends StaticRouter { - private ragfairCallbacks; + protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/TraderStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/TraderStaticRouter.d.ts index 18f0629..41728a1 100644 --- a/TypeScript/9RouterHooks/types/routers/static/TraderStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/TraderStaticRouter.d.ts @@ -1,6 +1,6 @@ import { TraderCallbacks } from "../../callbacks/TraderCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class TraderStaticRouter extends StaticRouter { - private traderCallbacks; + protected traderCallbacks: TraderCallbacks; constructor(traderCallbacks: TraderCallbacks); } diff --git a/TypeScript/9RouterHooks/types/routers/static/WeatherStaticRouter.d.ts b/TypeScript/9RouterHooks/types/routers/static/WeatherStaticRouter.d.ts index 61b904d..72ed851 100644 --- a/TypeScript/9RouterHooks/types/routers/static/WeatherStaticRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/static/WeatherStaticRouter.d.ts @@ -1,6 +1,6 @@ import { WeatherCallbacks } from "../../callbacks/WeatherCallbacks"; import { StaticRouter } from "../../di/Router"; export declare class WeatherStaticRouter extends StaticRouter { - private weatherCallbacks; + protected weatherCallbacks: WeatherCallbacks; constructor(weatherCallbacks: WeatherCallbacks); } diff --git a/TypeScript/9RouterHooks/types/servers/ConfigServer.d.ts b/TypeScript/9RouterHooks/types/servers/ConfigServer.d.ts index 83af38d..a079be8 100644 --- a/TypeScript/9RouterHooks/types/servers/ConfigServer.d.ts +++ b/TypeScript/9RouterHooks/types/servers/ConfigServer.d.ts @@ -3,10 +3,10 @@ import { VFS } from "../utils/VFS"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigTypes } from "../models/enums/ConfigTypes"; export declare class ConfigServer { - private logger; - private vfs; - private jsonUtil; - private configs; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected configs: Record; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil); getConfig(configType: ConfigTypes): T; getConfigByString(configType: string): T; diff --git a/TypeScript/9RouterHooks/types/servers/DatabaseServer.d.ts b/TypeScript/9RouterHooks/types/servers/DatabaseServer.d.ts index 521bcf9..aa152d0 100644 --- a/TypeScript/9RouterHooks/types/servers/DatabaseServer.d.ts +++ b/TypeScript/9RouterHooks/types/servers/DatabaseServer.d.ts @@ -1,6 +1,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; export declare class DatabaseServer { - private tableData; + protected tableData: IDatabaseTables; getTables(): IDatabaseTables; setTables(any: any): void; } diff --git a/TypeScript/9RouterHooks/types/servers/HttpServer.d.ts b/TypeScript/9RouterHooks/types/servers/HttpServer.d.ts index 274a299..5234966 100644 --- a/TypeScript/9RouterHooks/types/servers/HttpServer.d.ts +++ b/TypeScript/9RouterHooks/types/servers/HttpServer.d.ts @@ -5,6 +5,7 @@ import { Serializer } from "../di/Serializer"; import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { NotifierHelper } from "../helpers/NotifierHelper"; import { INotification } from "../models/eft/notifier/INotifier"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpServer } from "../models/spt/server/IHttpServer"; import { ILogger } from "../models/spt/utils/ILogger"; import { HttpRouter } from "../routers/HttpRouter"; @@ -14,24 +15,24 @@ import { RandomUtil } from "../utils/RandomUtil"; import { ConfigServer } from "./ConfigServer"; import { DatabaseServer } from "./DatabaseServer"; export declare class HttpServer implements IHttpServer { - private httpRouter; - private logger; - private randomUtil; - private jsonUtil; - private httpResponse; - private databaseServer; - private notifierHelper; - private httpServerHelper; - private serializers; - private configServer; + protected httpRouter: HttpRouter; + protected logger: ILogger; + protected randomUtil: RandomUtil; + protected jsonUtil: JsonUtil; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected httpServerHelper: HttpServerHelper; + protected serializers: Serializer[]; + protected configServer: ConfigServer; constructor(httpRouter: HttpRouter, // TODO: delay required logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, serializers: Serializer[], configServer: ConfigServer); - private buffers; - private onReceive; - private onRespond; - private httpConfig; - private webSockets; - private websocketPingHandler; + protected buffers: {}; + protected onReceive: {}; + protected onRespond: {}; + protected httpConfig: IHttpConfig; + protected webSockets: {}; + protected websocketPingHandler: any; getCookies(req: http.IncomingMessage): any; resetBuffer(sessionID: string): void; putInBuffer(sessionID: any, data: any, bufLength: number): boolean; @@ -43,6 +44,6 @@ export declare class HttpServer implements IHttpServer { sendResponse(sessionID: string, req: any, resp: any, body: Buffer): void; handleRequest(req: http.IncomingMessage, resp: http.ServerResponse): void; load(): void; - private getRandomisedMessage; + protected getRandomisedMessage(): string; wsOnConnection(ws: any, req: any): void; } diff --git a/TypeScript/9RouterHooks/types/servers/RagfairServer.d.ts b/TypeScript/9RouterHooks/types/servers/RagfairServer.d.ts index cf56d64..60c92b5 100644 --- a/TypeScript/9RouterHooks/types/servers/RagfairServer.d.ts +++ b/TypeScript/9RouterHooks/types/servers/RagfairServer.d.ts @@ -1,18 +1,19 @@ import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { RagfairCategoriesService } from "../services/RagfairCategoriesService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService"; import { ConfigServer } from "./ConfigServer"; export declare class RagfairServer { - private logger; - private ragfairOfferGenerator; - private ragfairOfferService; - private ragfairCategoriesService; - private ragfairRequiredItemsService; - private configServer; - private ragfairConfig; + protected logger: ILogger; + protected ragfairOfferGenerator: RagfairOfferGenerator; + protected ragfairOfferService: RagfairOfferService; + protected ragfairCategoriesService: RagfairCategoriesService; + protected ragfairRequiredItemsService: RagfairRequiredItemsService; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); load(): void; update(): void; diff --git a/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts b/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts index fdf92e4..cb28f49 100644 --- a/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts +++ b/TypeScript/9RouterHooks/types/servers/SaveServer.d.ts @@ -5,15 +5,15 @@ import { VFS } from "../utils/VFS"; import { SaveLoadRouter } from "../di/Router"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class SaveServer { - private vfs; - private saveLoadRouters; - private jsonUtil; - private hashUtil; - private logger; - private profileFilepath; - private profiles; - private onSave; - private saveMd5; + protected vfs: VFS; + protected saveLoadRouters: SaveLoadRouter[]; + protected jsonUtil: JsonUtil; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected profileFilepath: string; + protected profiles: {}; + protected onSave: {}; + protected saveMd5: {}; constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger); load(): void; save(): void; diff --git a/TypeScript/9RouterHooks/types/services/FenceService.d.ts b/TypeScript/9RouterHooks/types/services/FenceService.d.ts index 27d14ef..12723fb 100644 --- a/TypeScript/9RouterHooks/types/services/FenceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/FenceService.d.ts @@ -4,6 +4,7 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { FenceLevel } from "../models/eft/common/IGlobals"; import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort } from "../models/eft/common/tables/ITrader"; +import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,19 +12,19 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; export declare class FenceService { - private logger; - private hashUtil; - private jsonUtil; - private randomUtil; - private databaseServer; - private handbookHelper; - private itemHelper; - private presetHelper; - private configServer; - private fenceAssort; - private traderConfig; + protected logger: ILogger; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected randomUtil: RandomUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected configServer: ConfigServer; + protected fenceAssort: ITraderAssort; + protected traderConfig: ITraderConfig; constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, configServer: ConfigServer); - private setFenceAssort; + protected setFenceAssort(fenceAssort: ITraderAssort): void; getFenceAssorts(): ITraderAssort; hasExpiredCache(refreshAssort: boolean): boolean; generateFenceAssortCache(pmcData: IPmcData): void; diff --git a/TypeScript/9RouterHooks/types/services/HashCacheService.d.ts b/TypeScript/9RouterHooks/types/services/HashCacheService.d.ts index c9b0170..5320f28 100644 --- a/TypeScript/9RouterHooks/types/services/HashCacheService.d.ts +++ b/TypeScript/9RouterHooks/types/services/HashCacheService.d.ts @@ -3,13 +3,13 @@ import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { VFS } from "../utils/VFS"; export declare class HashCacheService { - private vfs; - private hashUtil; - private jsonUtil; - private logger; - private jsonHashes; - private modHashes; - private readonly modCachePath; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected jsonUtil: JsonUtil; + protected logger: ILogger; + protected jsonHashes: any; + protected modHashes: any; + protected readonly modCachePath = "./user/cache/modCache.json"; constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger); getStoredModHash(modName: string): string; modContentMatchesStoredHash(modName: string, modContent: string): boolean; diff --git a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts index 160faba..0219816 100644 --- a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts @@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -11,18 +12,18 @@ import { SaveServer } from "../servers/SaveServer"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class InsuranceService { - private logger; - private databaseServer; - private secureContainerHelper; - private randomUtil; - private timeUtil; - private saveServer; - private traderHelper; - private dialogueHelper; - private configServer; - private insured; - private templatesById; - private insuranceConfig; + protected logger: ILogger; + protected databaseServer: DatabaseServer; + protected secureContainerHelper: SecureContainerHelper; + protected randomUtil: RandomUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected traderHelper: TraderHelper; + protected dialogueHelper: DialogueHelper; + protected configServer: ConfigServer; + protected insured: Record>; + protected templatesById: {}; + protected insuranceConfig: IInsuranceConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; @@ -36,6 +37,6 @@ export declare class InsuranceService { sendInsuredItems(pmcData: IPmcData, sessionID: string): void; storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; storeInsuredItemsForReturn(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string): void; - private addGearToSend; + protected addGearToSend(pmcData: IPmcData, insuredItem: any, actualItem: any, sessionID: string): any; getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/9RouterHooks/types/services/MatchLocationService.d.ts b/TypeScript/9RouterHooks/types/services/MatchLocationService.d.ts index f7b7d3b..2b5fc0e 100644 --- a/TypeScript/9RouterHooks/types/services/MatchLocationService.d.ts +++ b/TypeScript/9RouterHooks/types/services/MatchLocationService.d.ts @@ -1,7 +1,7 @@ import { TimeUtil } from "../utils/TimeUtil"; export declare class MatchLocationService { - private timeUtil; - private locations; + protected timeUtil: TimeUtil; + protected locations: {}; constructor(timeUtil: TimeUtil); createGroup(sessionID: string, info: any): any; deleteGroup(info: any): void; diff --git a/TypeScript/9RouterHooks/types/services/ModCompilerService.d.ts b/TypeScript/9RouterHooks/types/services/ModCompilerService.d.ts index fa4d1a9..26cb4ac 100644 --- a/TypeScript/9RouterHooks/types/services/ModCompilerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ModCompilerService.d.ts @@ -1,19 +1,20 @@ +import * as ts from "typescript"; import { ILogger } from "../models/spt/utils/ILogger"; import { VFS } from "../utils/VFS"; import { HashCacheService } from "./HashCacheService"; export declare class ModCompilerService { - private logger; - private hashCacheService; - private vfs; + protected logger: ILogger; + protected hashCacheService: HashCacheService; + protected vfs: VFS; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise; - private compile; - private buildDepth; - private getNodesModulesPath; - private getAkiPath; - private getAkiFolder; - private getNodesModulesFolder; - private calculateDepth; - private areFilesReady; - private delay; + protected compile(fileNames: string[], options: ts.CompilerOptions): Promise; + protected buildDepth(depth: number): string; + protected getNodesModulesPath(depth: number): string; + protected getAkiPath(depth: number): string; + protected getAkiFolder(): string; + protected getNodesModulesFolder(): string; + protected calculateDepth(file: string): number; + protected areFilesReady(fileNames: string[]): boolean; + protected delay(ms: number): Promise; } diff --git a/TypeScript/9RouterHooks/types/services/NotificationService.d.ts b/TypeScript/9RouterHooks/types/services/NotificationService.d.ts index 9c6c143..7e2a127 100644 --- a/TypeScript/9RouterHooks/types/services/NotificationService.d.ts +++ b/TypeScript/9RouterHooks/types/services/NotificationService.d.ts @@ -1,6 +1,6 @@ import { INotification } from "../models/eft/notifier/INotifier"; export declare class NotificationService { - private messageQueue; + protected messageQueue: {}; getMessageQueue(): {}; getMessageFromQueue(sessionId: string): any; updateMessageOnQueue(sessionId: string, value: any[]): void; diff --git a/TypeScript/9RouterHooks/types/services/PaymentService.d.ts b/TypeScript/9RouterHooks/types/services/PaymentService.d.ts index 0a6c4d6..5834750 100644 --- a/TypeScript/9RouterHooks/types/services/PaymentService.d.ts +++ b/TypeScript/9RouterHooks/types/services/PaymentService.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; +import { Item } from "../models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData"; @@ -11,14 +12,14 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; export declare class PaymentService { - private logger; - private httpResponse; - private databaseServer; - private handbookHelper; - private traderHelper; - private itemHelper; - private inventoryHelper; - private paymentHelper; + protected logger: ILogger; + protected httpResponse: HttpResponseUtil; + protected databaseServer: DatabaseServer; + protected handbookHelper: HandbookHelper; + protected traderHelper: TraderHelper; + protected itemHelper: ItemHelper; + protected inventoryHelper: InventoryHelper; + protected paymentHelper: PaymentHelper; constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper); /** * Take money and insert items into return to server request @@ -43,6 +44,6 @@ export declare class PaymentService { * inside the stash, that is it has the stash as * ancestor with slotId=hideout */ - private isItemInStash; + protected isItemInStash(pmcData: IPmcData, item: Item): boolean; addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; } diff --git a/TypeScript/9RouterHooks/types/services/PlayerService.d.ts b/TypeScript/9RouterHooks/types/services/PlayerService.d.ts index 99e5986..519b7e5 100644 --- a/TypeScript/9RouterHooks/types/services/PlayerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/PlayerService.d.ts @@ -3,8 +3,8 @@ import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPla import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; export declare class PlayerService { - private logger; - private databaseServer; + protected logger: ILogger; + protected databaseServer: DatabaseServer; constructor(logger: ILogger, databaseServer: DatabaseServer); /** * increases the profile skill and updates any output diff --git a/TypeScript/9RouterHooks/types/services/RagfairCategoriesService.d.ts b/TypeScript/9RouterHooks/types/services/RagfairCategoriesService.d.ts index fb9efa2..09956cc 100644 --- a/TypeScript/9RouterHooks/types/services/RagfairCategoriesService.d.ts +++ b/TypeScript/9RouterHooks/types/services/RagfairCategoriesService.d.ts @@ -1,7 +1,7 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairCategoriesService { updateCategories(offers: IRagfairOffer[]): void; - private categories; + protected categories: Record; getCategories(): Record; getCategoryByItemId(itemId: string): number; resetCategories(): void; diff --git a/TypeScript/9RouterHooks/types/services/RagfairLinkedItemService.d.ts b/TypeScript/9RouterHooks/types/services/RagfairLinkedItemService.d.ts index 3dbcf6f..6c34ee0 100644 --- a/TypeScript/9RouterHooks/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/9RouterHooks/types/services/RagfairLinkedItemService.d.ts @@ -1,9 +1,10 @@ import { DatabaseServer } from "../servers/DatabaseServer"; +import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; export declare class RagfairLinkedItemService { - private databaseServer; - private linkedItemsCache; + protected databaseServer: DatabaseServer; + protected linkedItemsCache: Record>; constructor(databaseServer: DatabaseServer); getLinkedItems(linkedSearchId: string): Iterable; - private buildLinkedItemTable; - private getFilters; + protected buildLinkedItemTable(): void; + protected getFilters(item: ITemplateItem, slot: string): string[]; } diff --git a/TypeScript/9RouterHooks/types/services/RagfairOfferService.d.ts b/TypeScript/9RouterHooks/types/services/RagfairOfferService.d.ts index 9b1bf8d..7afbf8c 100644 --- a/TypeScript/9RouterHooks/types/services/RagfairOfferService.d.ts +++ b/TypeScript/9RouterHooks/types/services/RagfairOfferService.d.ts @@ -1,7 +1,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; import { Item } from "../models/eft/common/tables/IItem"; +import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ConfigServer } from "../servers/ConfigServer"; @@ -10,20 +12,20 @@ import { SaveServer } from "../servers/SaveServer"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class RagfairOfferService { - private logger; - private timeUtil; - private databaseServer; - private saveServer; - private ragfairServerHelper; - private profileHelper; - private itemEventRouter; - private httpResponse; - private configServer; - private playerOffersLoaded; - private toUpdate; - private expiredOffers; - private offers; - private ragfairConfig; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected databaseServer: DatabaseServer; + protected saveServer: SaveServer; + protected ragfairServerHelper: RagfairServerHelper; + protected profileHelper: ProfileHelper; + protected itemEventRouter: ItemEventRouter; + protected httpResponse: HttpResponseUtil; + protected configServer: ConfigServer; + protected playerOffersLoaded: boolean; + protected toUpdate: Record; + protected expiredOffers: Item[]; + protected offers: IRagfairOffer[]; + protected ragfairConfig: IRagfairConfig; constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); getOffers(): IRagfairOffer[]; getOfferByOfferId(offerId: string): IRagfairOffer; @@ -57,8 +59,8 @@ export declare class RagfairOfferService { * Get an array of stale offers that are still shown to player * @returns IRagfairOffer array */ - private getStaleOffers; - private isStale; - private processStaleOffer; - private returnPlayerOffer; + protected getStaleOffers(): IRagfairOffer[]; + protected isStale(offer: IRagfairOffer, time: number): boolean; + protected processStaleOffer(staleOffer: IRagfairOffer): void; + protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse; } diff --git a/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts b/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts index 7cdf854..5256b99 100644 --- a/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts @@ -3,20 +3,22 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { Item } from "../models/eft/common/tables/IItem"; import { IBarterScheme } from "../models/eft/common/tables/ITrader"; +import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; +import { IRagfairServerPrices } from "../models/spt/ragfair/IRagfairServerPrices"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; export declare class RagfairPriceService { - private handbookHelper; - private databaseServer; - private logger; - private itemHelper; - private presetHelper; - private randomUtil; - private configServer; - private ragfairConfig; - private prices; + protected handbookHelper: HandbookHelper; + protected databaseServer: DatabaseServer; + protected logger: ILogger; + protected itemHelper: ItemHelper; + protected presetHelper: PresetHelper; + protected randomUtil: RandomUtil; + protected configServer: ConfigServer; + protected ragfairConfig: IRagfairConfig; + protected prices: IRagfairServerPrices; constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); generateStaticPrices(): void; generateDynamicPrices(): void; diff --git a/TypeScript/9RouterHooks/types/services/RagfairRequiredItemsService.d.ts b/TypeScript/9RouterHooks/types/services/RagfairRequiredItemsService.d.ts index e4582d0..b05fc65 100644 --- a/TypeScript/9RouterHooks/types/services/RagfairRequiredItemsService.d.ts +++ b/TypeScript/9RouterHooks/types/services/RagfairRequiredItemsService.d.ts @@ -2,10 +2,10 @@ import { PaymentHelper } from "../helpers/PaymentHelper"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairRequiredItemsService { - private logger; - private paymentHelper; - private ragfairOfferService; - private requiredItemsCache; + protected logger: ILogger; + protected paymentHelper: PaymentHelper; + protected ragfairOfferService: RagfairOfferService; + protected requiredItemsCache: {}; constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService); getRequiredItems(searchId: string): any; buildRequiredItemTable(): void; diff --git a/TypeScript/9RouterHooks/types/services/TraderAssortService.d.ts b/TypeScript/9RouterHooks/types/services/TraderAssortService.d.ts index ccb9e45..5ba2d05 100644 --- a/TypeScript/9RouterHooks/types/services/TraderAssortService.d.ts +++ b/TypeScript/9RouterHooks/types/services/TraderAssortService.d.ts @@ -1,6 +1,6 @@ import { ITraderAssort } from "../models/eft/common/tables/ITrader"; export declare class TraderAssortService { - private pristineTraderAssorts; + protected pristineTraderAssorts: Record; getPristineTraderAssort(traderId: string): ITraderAssort; setPristineTraderAssort(traderId: string, assort: ITraderAssort): void; } diff --git a/TypeScript/9RouterHooks/types/services/mod/image/imageRouteService.d.ts b/TypeScript/9RouterHooks/types/services/mod/image/imageRouteService.d.ts index 854083c..29569b2 100644 --- a/TypeScript/9RouterHooks/types/services/mod/image/imageRouteService.d.ts +++ b/TypeScript/9RouterHooks/types/services/mod/image/imageRouteService.d.ts @@ -1,5 +1,5 @@ export declare class ImageRouteService { - private routes; + protected routes: Record; addRoute(urlKey: string, route: string): void; getByKey(urlKey: string): string; existsByKey(urlKey: string): boolean; diff --git a/TypeScript/9RouterHooks/types/services/mod/onLoad/OnLoadModService.d.ts b/TypeScript/9RouterHooks/types/services/mod/onLoad/OnLoadModService.d.ts index 89bad14..f402103 100644 --- a/TypeScript/9RouterHooks/types/services/mod/onLoad/OnLoadModService.d.ts +++ b/TypeScript/9RouterHooks/types/services/mod/onLoad/OnLoadModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnLoadModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnLoad(name: string, onLoad: () => void, getRoute: () => string): void; } diff --git a/TypeScript/9RouterHooks/types/services/mod/onUpdate/OnUpdateModService.d.ts b/TypeScript/9RouterHooks/types/services/mod/onUpdate/OnUpdateModService.d.ts index 32419f4..05d735b 100644 --- a/TypeScript/9RouterHooks/types/services/mod/onUpdate/OnUpdateModService.d.ts +++ b/TypeScript/9RouterHooks/types/services/mod/onUpdate/OnUpdateModService.d.ts @@ -1,6 +1,6 @@ import { DependencyContainer } from "tsyringe"; export declare class OnUpdateModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerOnUpdate(name: string, onUpdate: (timeSinceLastRun: number) => boolean, getRoute: () => string): void; } diff --git a/TypeScript/9RouterHooks/types/services/mod/staticRouter/StaticRouterModService.d.ts b/TypeScript/9RouterHooks/types/services/mod/staticRouter/StaticRouterModService.d.ts index d4c42aa..f28fd45 100644 --- a/TypeScript/9RouterHooks/types/services/mod/staticRouter/StaticRouterModService.d.ts +++ b/TypeScript/9RouterHooks/types/services/mod/staticRouter/StaticRouterModService.d.ts @@ -1,7 +1,7 @@ import { DependencyContainer } from "tsyringe"; import { RouteAction } from "../../../di/Router"; export declare class StaticRouterModService { - private container; + protected container: DependencyContainer; constructor(container: DependencyContainer); registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void; } diff --git a/TypeScript/9RouterHooks/types/utils/App.d.ts b/TypeScript/9RouterHooks/types/utils/App.d.ts index a11f576..34c141e 100644 --- a/TypeScript/9RouterHooks/types/utils/App.d.ts +++ b/TypeScript/9RouterHooks/types/utils/App.d.ts @@ -3,12 +3,12 @@ import { OnLoad } from "../di/OnLoad"; import { OnUpdate } from "../di/OnUpdate"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class App { - private logger; - private timeUtil; - private onLoadComponents; - private onUpdateComponents; - private onUpdateLastRun; + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected onLoadComponents: OnLoad[]; + protected onUpdateComponents: OnUpdate[]; + protected onUpdateLastRun: {}; constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]); load(): void; - private update; + protected update(onUpdateComponents: OnUpdate[]): void; } diff --git a/TypeScript/9RouterHooks/types/utils/AyncQueue.d.ts b/TypeScript/9RouterHooks/types/utils/AyncQueue.d.ts index a99aa37..da6ab18 100644 --- a/TypeScript/9RouterHooks/types/utils/AyncQueue.d.ts +++ b/TypeScript/9RouterHooks/types/utils/AyncQueue.d.ts @@ -1,7 +1,7 @@ import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { ICommand } from "../models/spt/utils/ICommand"; export declare class AsyncQueue implements IAsyncQueue { - private commandsQueue; + protected commandsQueue: ICommand[]; constructor(); waitFor(command: ICommand): Promise; } diff --git a/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts b/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts index 97dda30..0857b67 100644 --- a/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts @@ -5,11 +5,11 @@ import { ImageRouter } from "../routers/ImageRouter"; import { OnLoad } from "../di/OnLoad"; import { ILogger } from "../models/spt/utils/ILogger"; export declare class DatabaseImporter extends OnLoad { - private logger; - private vfs; - private jsonUtil; - private databaseServer; - private imageRouter; + protected logger: ILogger; + protected vfs: VFS; + protected jsonUtil: JsonUtil; + protected databaseServer: DatabaseServer; + protected imageRouter: ImageRouter; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; getRoute(): string; diff --git a/TypeScript/9RouterHooks/types/utils/HashUtil.d.ts b/TypeScript/9RouterHooks/types/utils/HashUtil.d.ts index cf92b47..bacbf2a 100644 --- a/TypeScript/9RouterHooks/types/utils/HashUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/HashUtil.d.ts @@ -2,7 +2,7 @@ import crypto from "crypto"; import { TimeUtil } from "./TimeUtil"; export declare class HashUtil { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); generate(): string; generateMd5ForData(data: string): string; diff --git a/TypeScript/9RouterHooks/types/utils/HttpResponseUtil.d.ts b/TypeScript/9RouterHooks/types/utils/HttpResponseUtil.d.ts index 85c28bd..29502be 100644 --- a/TypeScript/9RouterHooks/types/utils/HttpResponseUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/HttpResponseUtil.d.ts @@ -3,9 +3,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; export declare class HttpResponseUtil { - private jsonUtil; + protected jsonUtil: JsonUtil; constructor(jsonUtil: JsonUtil); - private clearString; + protected clearString(s: string): any; noBody(data: any): any; getBody(data: T, err?: number, errmsg?: any): IGetBodyResponseData; getUnclearedBody(data: any, err?: number, errmsg?: any): string; diff --git a/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts b/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts index 20b7448..71e95f6 100644 --- a/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts @@ -2,10 +2,10 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { HashUtil } from "./HashUtil"; import { VFS } from "./VFS"; export declare class JsonUtil { - private vfs; - private hashUtil; - private logger; - private fileHashes; + protected vfs: VFS; + protected hashUtil: HashUtil; + protected logger: ILogger; + protected fileHashes: any; constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger); /** * From object to string diff --git a/TypeScript/9RouterHooks/types/utils/Logger.d.ts b/TypeScript/9RouterHooks/types/utils/Logger.d.ts index 9d5b32a..f5b774b 100644 --- a/TypeScript/9RouterHooks/types/utils/Logger.d.ts +++ b/TypeScript/9RouterHooks/types/utils/Logger.d.ts @@ -1,18 +1,43 @@ /// import { Daum } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { ILogger } from "../models/spt/utils/ILogger"; +import winston from "winston"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; import fs from "fs"; +interface SptLogger { + error: (msg: string | Record) => void; + warn: (msg: string | Record) => void; + succ?: (msg: string | Record) => void; + info: (msg: string | Record) => void; + debug: (msg: string | Record) => void; +} export declare class WinstonLogger implements ILogger { - private asyncQueue; - private uuidGenerator; - private showDebugInConsole; - private folderPath; - private file; - private filePath; - private logLevels; - private logger; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; + protected showDebugInConsole: boolean; + protected folderPath: string; + protected file: string; + protected filePath: string; + protected logLevels: { + levels: { + error: number; + warn: number; + succ: number; + info: number; + custom: number; + debug: number; + }; + colors: { + error: string; + warn: string; + succ: string; + info: string; + custom: string; + debug: string; + }; + }; + protected logger: winston.Logger & SptLogger; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); writeToLogFile(data: string | Daum): Promise; @@ -23,3 +48,4 @@ export declare class WinstonLogger implements ILogger { info(data: string | Record): Promise; debug(data: string | Record, onlyShowInConsole?: boolean): Promise; } +export {}; diff --git a/TypeScript/9RouterHooks/types/utils/ObjectId.d.ts b/TypeScript/9RouterHooks/types/utils/ObjectId.d.ts index b100572..03aae56 100644 --- a/TypeScript/9RouterHooks/types/utils/ObjectId.d.ts +++ b/TypeScript/9RouterHooks/types/utils/ObjectId.d.ts @@ -1,13 +1,13 @@ /// import { TimeUtil } from "./TimeUtil"; export declare class ObjectId { - private timeUtil; + protected timeUtil: TimeUtil; constructor(timeUtil: TimeUtil); - private randomBytes; - private constglobalCounter; - private consttime; - private globalCounter; - private time; + protected randomBytes: Buffer; + protected constglobalCounter: number; + protected consttime: number; + protected globalCounter: number; + protected time: number; incGlobalCounter(): number; toHexString(byteArray: string | any[] | Buffer): string; generate(): string; diff --git a/TypeScript/9RouterHooks/types/utils/RandomUtil.d.ts b/TypeScript/9RouterHooks/types/utils/RandomUtil.d.ts index 3a3ecb6..c24dd60 100644 --- a/TypeScript/9RouterHooks/types/utils/RandomUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/RandomUtil.d.ts @@ -103,8 +103,8 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - private jsonUtil; - private logger; + protected jsonUtil: JsonUtil; + protected logger: ILogger; constructor(jsonUtil: JsonUtil, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; diff --git a/TypeScript/9RouterHooks/types/utils/VFS.d.ts b/TypeScript/9RouterHooks/types/utils/VFS.d.ts index 7e66fac..e5eaf02 100644 --- a/TypeScript/9RouterHooks/types/utils/VFS.d.ts +++ b/TypeScript/9RouterHooks/types/utils/VFS.d.ts @@ -5,8 +5,8 @@ import fs from "fs"; import { IAsyncQueue } from "../models/spt/utils/IAsyncQueue"; import { IUUidGenerator } from "../models/spt/utils/IUuidGenerator"; export declare class VFS { - private asyncQueue; - private uuidGenerator; + protected asyncQueue: IAsyncQueue; + protected uuidGenerator: IUUidGenerator; accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { diff --git a/TypeScript/9RouterHooks/types/utils/Watermark.d.ts b/TypeScript/9RouterHooks/types/utils/Watermark.d.ts index 3a8cb3a..111bdd0 100644 --- a/TypeScript/9RouterHooks/types/utils/Watermark.d.ts +++ b/TypeScript/9RouterHooks/types/utils/Watermark.d.ts @@ -1,20 +1,32 @@ +import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; export declare class WatermarkLocale { - private locales; + protected locales: { + "en-US": { + description: string[]; + warning: string[]; + modding: string[]; + }; + "zh-CN": { + description: string[]; + warning: string[]; + modding: string[]; + }; + }; getLocale(): string; getDescription(): string[]; getWarning(): string[]; getModding(): string[]; } export declare class Watermark { - private logger; - private configServer; - private watermarkLocale?; - private akiConfig; + protected logger: ILogger; + protected configServer: ConfigServer; + protected watermarkLocale?: WatermarkLocale; + protected akiConfig: ICoreConfig; constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale); - private text; - private versionLabel; + protected text: string[]; + protected versionLabel: string; initialize(): void; getVersionTag(): string; getVersionLabel(): string; @@ -25,5 +37,5 @@ export declare class Watermark { /** Draw the watermark */ draw(): void; /** Caculate text length */ - private textLength; + protected textLength(s: string): number; }