import { DependencyContainer, Lifecycle } from "tsyringe"; import { BotCallbacks } from "@spt-aki/callbacks/BotCallbacks"; import { BundleCallbacks } from "@spt-aki/callbacks/BundleCallbacks"; import { ClientLogCallbacks } from "@spt-aki/callbacks/ClientLogCallbacks"; import { CustomizationCallbacks } from "@spt-aki/callbacks/CustomizationCallbacks"; import { DataCallbacks } from "@spt-aki/callbacks/DataCallbacks"; import { DialogueCallbacks } from "@spt-aki/callbacks/DialogueCallbacks"; import { GameCallbacks } from "@spt-aki/callbacks/GameCallbacks"; import { HandbookCallbacks } from "@spt-aki/callbacks/HandbookCallbacks"; import { HealthCallbacks } from "@spt-aki/callbacks/HealthCallbacks"; import { HideoutCallbacks } from "@spt-aki/callbacks/HideoutCallbacks"; import { HttpCallbacks } from "@spt-aki/callbacks/HttpCallbacks"; import { InraidCallbacks } from "@spt-aki/callbacks/InraidCallbacks"; import { InsuranceCallbacks } from "@spt-aki/callbacks/InsuranceCallbacks"; import { InventoryCallbacks } from "@spt-aki/callbacks/InventoryCallbacks"; import { ItemEventCallbacks } from "@spt-aki/callbacks/ItemEventCallbacks"; import { LauncherCallbacks } from "@spt-aki/callbacks/LauncherCallbacks"; import { LocationCallbacks } from "@spt-aki/callbacks/LocationCallbacks"; import { MatchCallbacks } from "@spt-aki/callbacks/MatchCallbacks"; import { ModCallbacks } from "@spt-aki/callbacks/ModCallbacks"; import { NoteCallbacks } from "@spt-aki/callbacks/NoteCallbacks"; import { NotifierCallbacks } from "@spt-aki/callbacks/NotifierCallbacks"; import { PresetBuildCallbacks } from "@spt-aki/callbacks/PresetBuildCallbacks"; import { PresetCallbacks } from "@spt-aki/callbacks/PresetCallbacks"; import { ProfileCallbacks } from "@spt-aki/callbacks/ProfileCallbacks"; import { QuestCallbacks } from "@spt-aki/callbacks/QuestCallbacks"; import { RagfairCallbacks } from "@spt-aki/callbacks/RagfairCallbacks"; import { RepairCallbacks } from "@spt-aki/callbacks/RepairCallbacks"; import { SaveCallbacks } from "@spt-aki/callbacks/SaveCallbacks"; import { TradeCallbacks } from "@spt-aki/callbacks/TradeCallbacks"; import { TraderCallbacks } from "@spt-aki/callbacks/TraderCallbacks"; import { WeatherCallbacks } from "@spt-aki/callbacks/WeatherCallbacks"; import { WishlistCallbacks } from "@spt-aki/callbacks/WishlistCallbacks"; import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; import { BotController } from "@spt-aki/controllers/BotController"; import { ClientLogController } from "@spt-aki/controllers/ClientLogController"; import { CustomizationController } from "@spt-aki/controllers/CustomizationController"; import { DialogueController } from "@spt-aki/controllers/DialogueController"; import { GameController } from "@spt-aki/controllers/GameController"; import { HandbookController } from "@spt-aki/controllers/HandbookController"; import { HealthController } from "@spt-aki/controllers/HealthController"; import { HideoutController } from "@spt-aki/controllers/HideoutController"; import { InraidController } from "@spt-aki/controllers/InraidController"; import { InsuranceController } from "@spt-aki/controllers/InsuranceController"; import { InventoryController } from "@spt-aki/controllers/InventoryController"; import { LauncherController } from "@spt-aki/controllers/LauncherController"; import { LocationController } from "@spt-aki/controllers/LocationController"; import { MatchController } from "@spt-aki/controllers/MatchController"; import { NoteController } from "@spt-aki/controllers/NoteController"; import { NotifierController } from "@spt-aki/controllers/NotifierController"; import { PresetBuildController } from "@spt-aki/controllers/PresetBuildController"; import { PresetController } from "@spt-aki/controllers/PresetController"; import { ProfileController } from "@spt-aki/controllers/ProfileController"; import { QuestController } from "@spt-aki/controllers/QuestController"; import { RagfairController } from "@spt-aki/controllers/RagfairController"; import { RepairController } from "@spt-aki/controllers/RepairController"; import { RepeatableQuestController } from "@spt-aki/controllers/RepeatableQuestController"; import { TradeController } from "@spt-aki/controllers/TradeController"; import { TraderController } from "@spt-aki/controllers/TraderController"; import { WeatherController } from "@spt-aki/controllers/WeatherController"; import { WishlistController } from "@spt-aki/controllers/WishlistController"; import { BotEquipmentModGenerator } from "@spt-aki/generators/BotEquipmentModGenerator"; import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotInventoryGenerator } from "@spt-aki/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt-aki/generators/BotLevelGenerator"; import { BotLootGenerator } from "@spt-aki/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt-aki/generators/BotWeaponGenerator"; import { FenceBaseAssortGenerator } from "@spt-aki/generators/FenceBaseAssortGenerator"; import { LocationGenerator } from "@spt-aki/generators/LocationGenerator"; import { LootGenerator } from "@spt-aki/generators/LootGenerator"; import { PMCLootGenerator } from "@spt-aki/generators/PMCLootGenerator"; import { PlayerScavGenerator } from "@spt-aki/generators/PlayerScavGenerator"; import { RagfairAssortGenerator } from "@spt-aki/generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator"; import { RepeatableQuestGenerator } from "@spt-aki/generators/RepeatableQuestGenerator"; import { ScavCaseRewardGenerator } from "@spt-aki/generators/ScavCaseRewardGenerator"; import { WeatherGenerator } from "@spt-aki/generators/WeatherGenerator"; import { BarrelInventoryMagGen } from "@spt-aki/generators/weapongen/implementations/BarrelInventoryMagGen"; import { ExternalInventoryMagGen } from "@spt-aki/generators/weapongen/implementations/ExternalInventoryMagGen"; import { InternalMagazineInventoryMagGen } from "@spt-aki/generators/weapongen/implementations/InternalMagazineInventoryMagGen"; import { UbglExternalMagGen } from "@spt-aki/generators/weapongen/implementations/UbglExternalMagGen"; import { AssortHelper } from "@spt-aki/helpers/AssortHelper"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; import { DurabilityLimitsHelper } from "@spt-aki/helpers/DurabilityLimitsHelper"; import { GameEventHelper } from "@spt-aki/helpers/GameEventHelper"; import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { HealthHelper } from "@spt-aki/helpers/HealthHelper"; import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { InRaidHelper } from "@spt-aki/helpers/InRaidHelper"; import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt-aki/helpers/NotifierHelper"; import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; import { ProbabilityHelper } from "@spt-aki/helpers/ProbabilityHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper"; import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; import { RagfairHelper } from "@spt-aki/helpers/RagfairHelper"; import { RagfairOfferHelper } from "@spt-aki/helpers/RagfairOfferHelper"; import { RagfairSellHelper } from "@spt-aki/helpers/RagfairSellHelper"; import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; import { RagfairSortHelper } from "@spt-aki/helpers/RagfairSortHelper"; import { RepairHelper } from "@spt-aki/helpers/RepairHelper"; import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper"; import { SecureContainerHelper } from "@spt-aki/helpers/SecureContainerHelper"; import { TradeHelper } from "@spt-aki/helpers/TradeHelper"; import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { UtilityHelper } from "@spt-aki/helpers/UtilityHelper"; import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck"; import { PostAkiModLoader } from "@spt-aki/loaders/PostAkiModLoader"; import { PostDBModLoader } from "@spt-aki/loaders/PostDBModLoader"; import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { HttpRouter } from "@spt-aki/routers/HttpRouter"; import { ImageRouter } from "@spt-aki/routers/ImageRouter"; import { ItemEventRouter } from "@spt-aki/routers/ItemEventRouter"; import { BotDynamicRouter } from "@spt-aki/routers/dynamic/BotDynamicRouter"; import { BundleDynamicRouter } from "@spt-aki/routers/dynamic/BundleDynamicRouter"; import { CustomizationDynamicRouter } from "@spt-aki/routers/dynamic/CustomizationDynamicRouter"; import { DataDynamicRouter } from "@spt-aki/routers/dynamic/DataDynamicRouter"; import { HttpDynamicRouter } from "@spt-aki/routers/dynamic/HttpDynamicRouter"; import { InraidDynamicRouter } from "@spt-aki/routers/dynamic/InraidDynamicRouter"; import { LocationDynamicRouter } from "@spt-aki/routers/dynamic/LocationDynamicRouter"; import { NotifierDynamicRouter } from "@spt-aki/routers/dynamic/NotifierDynamicRouter"; import { TraderDynamicRouter } from "@spt-aki/routers/dynamic/TraderDynamicRouter"; import { CustomizationItemEventRouter } from "@spt-aki/routers/item_events/CustomizationItemEventRouter"; import { HealthItemEventRouter } from "@spt-aki/routers/item_events/HealthItemEventRouter"; import { HideoutItemEventRouter } from "@spt-aki/routers/item_events/HideoutItemEventRouter"; import { InsuranceItemEventRouter } from "@spt-aki/routers/item_events/InsuranceItemEventRouter"; import { InventoryItemEventRouter } from "@spt-aki/routers/item_events/InventoryItemEventRouter"; import { NoteItemEventRouter } from "@spt-aki/routers/item_events/NoteItemEventRouter"; import { PresetBuildItemEventRouter } from "@spt-aki/routers/item_events/PresetBuildItemEventRouter"; import { QuestItemEventRouter } from "@spt-aki/routers/item_events/QuestItemEventRouter"; import { RagfairItemEventRouter } from "@spt-aki/routers/item_events/RagfairItemEventRouter"; import { RepairItemEventRouter } from "@spt-aki/routers/item_events/RepairItemEventRouter"; import { TradeItemEventRouter } from "@spt-aki/routers/item_events/TradeItemEventRouter"; import { WishlistItemEventRouter } from "@spt-aki/routers/item_events/WishlistItemEventRouter"; import { HealthSaveLoadRouter } from "@spt-aki/routers/save_load/HealthSaveLoadRouter"; import { InraidSaveLoadRouter } from "@spt-aki/routers/save_load/InraidSaveLoadRouter"; import { InsuranceSaveLoadRouter } from "@spt-aki/routers/save_load/InsuranceSaveLoadRouter"; import { ProfileSaveLoadRouter } from "@spt-aki/routers/save_load/ProfileSaveLoadRouter"; import { BundleSerializer } from "@spt-aki/routers/serializers/BundleSerializer"; import { ImageSerializer } from "@spt-aki/routers/serializers/ImageSerializer"; import { NotifySerializer } from "@spt-aki/routers/serializers/NotifySerializer"; import { BotStaticRouter } from "@spt-aki/routers/static/BotStaticRouter"; import { BundleStaticRouter } from "@spt-aki/routers/static/BundleStaticRouter"; import { ClientLogStaticRouter } from "@spt-aki/routers/static/ClientLogStaticRouter"; import { CustomizationStaticRouter } from "@spt-aki/routers/static/CustomizationStaticRouter"; import { DataStaticRouter } from "@spt-aki/routers/static/DataStaticRouter"; import { DialogStaticRouter } from "@spt-aki/routers/static/DialogStaticRouter"; import { GameStaticRouter } from "@spt-aki/routers/static/GameStaticRouter"; import { HealthStaticRouter } from "@spt-aki/routers/static/HealthStaticRouter"; import { InraidStaticRouter } from "@spt-aki/routers/static/InraidStaticRouter"; import { InsuranceStaticRouter } from "@spt-aki/routers/static/InsuranceStaticRouter"; import { ItemEventStaticRouter } from "@spt-aki/routers/static/ItemEventStaticRouter"; import { LauncherStaticRouter } from "@spt-aki/routers/static/LauncherStaticRouter"; import { LocationStaticRouter } from "@spt-aki/routers/static/LocationStaticRouter"; import { MatchStaticRouter } from "@spt-aki/routers/static/MatchStaticRouter"; import { NotifierStaticRouter } from "@spt-aki/routers/static/NotifierStaticRouter"; import { PresetStaticRouter } from "@spt-aki/routers/static/PresetStaticRouter"; import { ProfileStaticRouter } from "@spt-aki/routers/static/ProfileStaticRouter"; import { QuestStaticRouter } from "@spt-aki/routers/static/QuestStaticRouter"; import { RagfairStaticRouter } from "@spt-aki/routers/static/RagfairStaticRouter"; import { TraderStaticRouter } from "@spt-aki/routers/static/TraderStaticRouter"; import { WeatherStaticRouter } from "@spt-aki/routers/static/WeatherStaticRouter"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpServer } from "@spt-aki/servers/HttpServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; import { AkiHttpListener } from "@spt-aki/servers/http/AkiHttpListener"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoolService"; import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheService"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { CustomLocationWaveService } from "@spt-aki/services/CustomLocationWaveService"; import { FenceService } from "@spt-aki/services/FenceService"; import { GiftService } from "@spt-aki/services/GiftService"; import { HashCacheService } from "@spt-aki/services/HashCacheService"; import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { MatchLocationService } from "@spt-aki/services/MatchLocationService"; import { ModCompilerService } from "@spt-aki/services/ModCompilerService"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { OpenZoneService } from "@spt-aki/services/OpenZoneService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; import { RagfairCategoriesService } from "@spt-aki/services/RagfairCategoriesService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { RagfairRequiredItemsService } from "@spt-aki/services/RagfairRequiredItemsService"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { RepairService } from "@spt-aki/services/RepairService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; import { CustomItemService } from "@spt-aki/services/mod/CustomItemService"; import { DynamicRouterModService } from "@spt-aki/services/mod/dynamicRouter/DynamicRouterModService"; import { HttpListenerModService } from "@spt-aki/services/mod/httpListener/HttpListenerModService"; import { ImageRouteService } from "@spt-aki/services/mod/image/ImageRouteService"; import { OnLoadModService } from "@spt-aki/services/mod/onLoad/OnLoadModService"; import { OnUpdateModService } from "@spt-aki/services/mod/onUpdate/OnUpdateModService"; import { StaticRouterModService } from "@spt-aki/services/mod/staticRouter/StaticRouterModService"; import { App } from "@spt-aki/utils/App"; import { AsyncQueue } from "@spt-aki/utils/AsyncQueue"; import { DatabaseImporter } from "@spt-aki/utils/DatabaseImporter"; import { EncodingUtil } from "@spt-aki/utils/EncodingUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; import { ImporterUtil } from "@spt-aki/utils/ImporterUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { VFS } from "@spt-aki/utils/VFS"; import { Watermark, WatermarkLocale } from "@spt-aki/utils/Watermark"; import { WinstonMainLogger } from "@spt-aki/utils/logging/WinstonMainLogger"; import { WinstonRequestLogger } from "@spt-aki/utils/logging/WinstonRequestLogger"; /** * Handle the registration of classes to be used by the Dependency Injection code */ export class Container { public static registerPostLoadTypes(container: DependencyContainer, childContainer: DependencyContainer): void { container.register("AkiHttpListener", AkiHttpListener, {lifecycle: Lifecycle.Singleton}); childContainer.registerType("HttpListener", "AkiHttpListener"); } public static registerTypes(con: DependencyContainer): void { con.register("ApplicationContext", ApplicationContext, {lifecycle: Lifecycle.Singleton}); Container.registerUtils(con); Container.registerRouters(con); Container.registerGenerators(con); Container.registerHelpers(con); Container.registerLoaders(con); Container.registerCallbacks(con); Container.registerServers(con); Container.registerServices(con); Container.registerControllers(con); } public static registerListTypes(con: DependencyContainer): void { con.register("OnLoadModService", {useValue: new OnLoadModService(con)}); con.register("HttpListenerModService", {useValue: new HttpListenerModService(con)}); con.register("OnUpdateModService", {useValue: new OnUpdateModService(con)}); con.register("DynamicRouterModService", {useValue: new DynamicRouterModService(con)}); con.register("StaticRouterModService", {useValue: new StaticRouterModService(con)}); con.registerType("OnLoad", "DatabaseImporter"); con.registerType("OnLoad", "PostDBModLoader"); con.registerType("OnLoad", "HandbookCallbacks"); con.registerType("OnLoad", "HttpCallbacks"); con.registerType("OnLoad", "PresetCallbacks"); con.registerType("OnLoad", "SaveCallbacks"); con.registerType("OnLoad", "TraderCallbacks"); // Must occur prior to RagfairCallbacks con.registerType("OnLoad", "RagfairPriceService"); con.registerType("OnLoad", "RagfairCallbacks"); con.registerType("OnLoad", "ModCallbacks"); con.registerType("OnLoad", "GameCallbacks"); con.registerType("OnUpdate", "DialogueCallbacks"); con.registerType("OnUpdate", "HideoutCallbacks"); con.registerType("OnUpdate", "TraderCallbacks"); con.registerType("OnUpdate", "RagfairCallbacks"); con.registerType("OnUpdate", "InsuranceCallbacks"); con.registerType("OnUpdate", "SaveCallbacks"); con.registerType("StaticRoutes", "BotStaticRouter"); con.registerType("StaticRoutes", "ClientLogStaticRouter"); con.registerType("StaticRoutes", "CustomizationStaticRouter"); con.registerType("StaticRoutes", "DataStaticRouter"); con.registerType("StaticRoutes", "DialogStaticRouter"); con.registerType("StaticRoutes", "GameStaticRouter"); con.registerType("StaticRoutes", "HealthStaticRouter"); con.registerType("StaticRoutes", "InraidStaticRouter"); con.registerType("StaticRoutes", "InsuranceStaticRouter"); con.registerType("StaticRoutes", "ItemEventStaticRouter"); con.registerType("StaticRoutes", "LauncherStaticRouter"); con.registerType("StaticRoutes", "LocationStaticRouter"); con.registerType("StaticRoutes", "WeatherStaticRouter"); con.registerType("StaticRoutes", "MatchStaticRouter"); con.registerType("StaticRoutes", "QuestStaticRouter"); con.registerType("StaticRoutes", "RagfairStaticRouter"); con.registerType("StaticRoutes", "PresetStaticRouter"); con.registerType("StaticRoutes", "BundleStaticRouter"); con.registerType("StaticRoutes", "NotifierStaticRouter"); con.registerType("StaticRoutes", "ProfileStaticRouter"); con.registerType("StaticRoutes", "TraderStaticRouter"); con.registerType("DynamicRoutes", "BotDynamicRouter"); con.registerType("DynamicRoutes", "BundleDynamicRouter"); con.registerType("DynamicRoutes", "CustomizationDynamicRouter"); con.registerType("DynamicRoutes", "DataDynamicRouter"); con.registerType("DynamicRoutes", "HttpDynamicRouter"); con.registerType("DynamicRoutes", "InraidDynamicRouter"); con.registerType("DynamicRoutes", "LocationDynamicRouter"); con.registerType("DynamicRoutes", "NotifierDynamicRouter"); con.registerType("DynamicRoutes", "TraderDynamicRouter"); con.registerType("IERouters", "CustomizationItemEventRouter"); con.registerType("IERouters", "HealthItemEventRouter"); con.registerType("IERouters", "HideoutItemEventRouter"); con.registerType("IERouters", "InsuranceItemEventRouter"); con.registerType("IERouters", "InventoryItemEventRouter"); con.registerType("IERouters", "NoteItemEventRouter"); con.registerType("IERouters", "PresetBuildItemEventRouter"); con.registerType("IERouters", "QuestItemEventRouter"); con.registerType("IERouters", "RagfairItemEventRouter"); con.registerType("IERouters", "RepairItemEventRouter"); con.registerType("IERouters", "TradeItemEventRouter"); con.registerType("IERouters", "WishlistItemEventRouter"); con.registerType("Serializer", "ImageSerializer"); con.registerType("Serializer", "BundleSerializer"); con.registerType("Serializer", "NotifySerializer"); con.registerType("SaveLoadRouter", "HealthSaveLoadRouter"); con.registerType("SaveLoadRouter", "InraidSaveLoadRouter"); con.registerType("SaveLoadRouter", "InsuranceSaveLoadRouter"); con.registerType("SaveLoadRouter", "ProfileSaveLoadRouter"); } private static registerUtils(con: DependencyContainer): void { // Utils con.register("App", App, {lifecycle: Lifecycle.Singleton}); con.register("DatabaseImporter", DatabaseImporter, {lifecycle: Lifecycle.Singleton}); con.register("HashUtil", HashUtil, {lifecycle: Lifecycle.Singleton}); con.register("ImporterUtil", ImporterUtil, {lifecycle: Lifecycle.Singleton}); con.register("HttpResponseUtil", HttpResponseUtil); con.register("EncodingUtil", EncodingUtil, {lifecycle: Lifecycle.Singleton}); con.register("JsonUtil", JsonUtil); con.register("WinstonLogger", WinstonMainLogger, {lifecycle: Lifecycle.Singleton}); con.register("RequestsLogger", WinstonRequestLogger, {lifecycle: Lifecycle.Singleton}); con.register("MathUtil", MathUtil, {lifecycle: Lifecycle.Singleton}); con.register("ObjectId", ObjectId); con.register("RandomUtil", RandomUtil, {lifecycle: Lifecycle.Singleton}); con.register("TimeUtil", TimeUtil, {lifecycle: Lifecycle.Singleton}); con.register("VFS", VFS, {lifecycle: Lifecycle.Singleton}); con.register("WatermarkLocale", WatermarkLocale, {lifecycle: Lifecycle.Singleton}); con.register("Watermark", Watermark, {lifecycle: Lifecycle.Singleton}); con.register("AsyncQueue", AsyncQueue, {lifecycle: Lifecycle.Singleton}); con.register("HttpFileUtil", HttpFileUtil, {lifecycle: Lifecycle.Singleton}); con.register("ModLoadOrder", ModLoadOrder, {lifecycle: Lifecycle.Singleton}); con.register("ModTypeCheck", ModTypeCheck, {lifecycle: Lifecycle.Singleton}); } private static registerRouters(con: DependencyContainer): void { // Routers con.register("HttpRouter", HttpRouter, {lifecycle: Lifecycle.Singleton}); con.register("ImageRouter", ImageRouter); con.register("EventOutputHolder", EventOutputHolder, {lifecycle: Lifecycle.Singleton}); con.register("ItemEventRouter", ItemEventRouter); // Dynamic routes con.register("BotDynamicRouter", {useClass: BotDynamicRouter}); con.register("BundleDynamicRouter", {useClass: BundleDynamicRouter}); con.register("CustomizationDynamicRouter", {useClass: CustomizationDynamicRouter}); con.register("DataDynamicRouter", {useClass: DataDynamicRouter}); con.register("HttpDynamicRouter", {useClass: HttpDynamicRouter}); con.register("InraidDynamicRouter", {useClass: InraidDynamicRouter}); con.register("LocationDynamicRouter", {useClass: LocationDynamicRouter}); con.register("NotifierDynamicRouter", {useClass: NotifierDynamicRouter}); con.register("TraderDynamicRouter", {useClass: TraderDynamicRouter}); // Item event routes con.register("CustomizationItemEventRouter", { useClass: CustomizationItemEventRouter, }); con.register("HealthItemEventRouter", {useClass: HealthItemEventRouter}); con.register("HideoutItemEventRouter", {useClass: HideoutItemEventRouter}); con.register("InsuranceItemEventRouter", {useClass: InsuranceItemEventRouter}); con.register("InventoryItemEventRouter", {useClass: InventoryItemEventRouter}); con.register("NoteItemEventRouter", {useClass: NoteItemEventRouter}); con.register("PresetBuildItemEventRouter", {useClass: PresetBuildItemEventRouter}); con.register("QuestItemEventRouter", {useClass: QuestItemEventRouter}); con.register("RagfairItemEventRouter", {useClass: RagfairItemEventRouter}); con.register("RepairItemEventRouter", {useClass: RepairItemEventRouter}); con.register("TradeItemEventRouter", {useClass: TradeItemEventRouter}); con.register("WishlistItemEventRouter", {useClass: WishlistItemEventRouter}); // save load routes con.register("HealthSaveLoadRouter", {useClass: HealthSaveLoadRouter}); con.register("InraidSaveLoadRouter", {useClass: InraidSaveLoadRouter}); con.register("InsuranceSaveLoadRouter", {useClass: InsuranceSaveLoadRouter}); con.register("ProfileSaveLoadRouter", {useClass: ProfileSaveLoadRouter}); // Route serializers con.register("BundleSerializer", {useClass: BundleSerializer}); con.register("ImageSerializer", {useClass: ImageSerializer}); con.register("NotifySerializer", {useClass: NotifySerializer}); // Static routes con.register("BotStaticRouter", {useClass: BotStaticRouter}); con.register("BundleStaticRouter", {useClass: BundleStaticRouter}); con.register("ClientLogStaticRouter", {useClass: ClientLogStaticRouter}); con.register("CustomizationStaticRouter", {useClass: CustomizationStaticRouter}); con.register("DataStaticRouter", {useClass: DataStaticRouter}); con.register("DialogStaticRouter", {useClass: DialogStaticRouter}); con.register("GameStaticRouter", {useClass: GameStaticRouter}); con.register("HealthStaticRouter", {useClass: HealthStaticRouter}); con.register("InraidStaticRouter", {useClass: InraidStaticRouter}); con.register("InsuranceStaticRouter", {useClass: InsuranceStaticRouter}); con.register("ItemEventStaticRouter", {useClass: ItemEventStaticRouter}); con.register("LauncherStaticRouter", {useClass: LauncherStaticRouter}); con.register("LocationStaticRouter", {useClass: LocationStaticRouter}); con.register("MatchStaticRouter", {useClass: MatchStaticRouter}); con.register("NotifierStaticRouter", {useClass: NotifierStaticRouter}); con.register("PresetStaticRouter", {useClass: PresetStaticRouter}); con.register("ProfileStaticRouter", {useClass: ProfileStaticRouter}); con.register("QuestStaticRouter", {useClass: QuestStaticRouter}); con.register("RagfairStaticRouter", {useClass: RagfairStaticRouter}); con.register("TraderStaticRouter", {useClass: TraderStaticRouter}); con.register("WeatherStaticRouter", {useClass: WeatherStaticRouter}); } private static registerGenerators(con: DependencyContainer): void { // Generators con.register("BotGenerator", BotGenerator); con.register("BotWeaponGenerator", BotWeaponGenerator); con.register("BotLootGenerator", BotLootGenerator); con.register("BotInventoryGenerator", BotInventoryGenerator); con.register("LocationGenerator", {useClass: LocationGenerator}); con.register("PMCLootGenerator", PMCLootGenerator, {lifecycle: Lifecycle.Singleton}); con.register("ScavCaseRewardGenerator", ScavCaseRewardGenerator, { lifecycle: Lifecycle.Singleton, }); con.register("RagfairAssortGenerator", {useClass: RagfairAssortGenerator}); con.register("RagfairOfferGenerator", {useClass: RagfairOfferGenerator}); con.register("WeatherGenerator", {useClass: WeatherGenerator}); con.register("PlayerScavGenerator", {useClass: PlayerScavGenerator}); con.register("LootGenerator", {useClass: LootGenerator}); con.register("FenceBaseAssortGenerator", {useClass: FenceBaseAssortGenerator}); con.register("BotLevelGenerator", {useClass: BotLevelGenerator}); con.register("BotEquipmentModGenerator", {useClass: BotEquipmentModGenerator}); con.register("RepeatableQuestGenerator", {useClass: RepeatableQuestGenerator}); con.register("BarrelInventoryMagGen", {useClass: BarrelInventoryMagGen}); con.register("ExternalInventoryMagGen", {useClass: ExternalInventoryMagGen}); con.register("InternalMagazineInventoryMagGen", { useClass: InternalMagazineInventoryMagGen, }); con.register("UbglExternalMagGen", {useClass: UbglExternalMagGen}); con.registerType("InventoryMagGen", "BarrelInventoryMagGen"); con.registerType("InventoryMagGen", "ExternalInventoryMagGen"); con.registerType("InventoryMagGen", "InternalMagazineInventoryMagGen"); con.registerType("InventoryMagGen", "UbglExternalMagGen"); } private static registerHelpers(con: DependencyContainer): void { // Helpers con.register("AssortHelper", {useClass: AssortHelper}); con.register("BotHelper", {useClass: BotHelper}); con.register("BotGeneratorHelper", {useClass: BotGeneratorHelper}); con.register("ContainerHelper", ContainerHelper); con.register("DialogueHelper", {useClass: DialogueHelper}); con.register("DurabilityLimitsHelper", {useClass: DurabilityLimitsHelper}); con.register("GameEventHelper", GameEventHelper); con.register("HandbookHelper", HandbookHelper, {lifecycle: Lifecycle.Singleton}); con.register("HealthHelper", {useClass: HealthHelper}); con.register("HideoutHelper", {useClass: HideoutHelper}); con.register("InRaidHelper", {useClass: InRaidHelper}); con.register("InventoryHelper", {useClass: InventoryHelper}); con.register("PaymentHelper", PaymentHelper); con.register("ItemHelper", {useClass: ItemHelper}); con.register("PresetHelper", PresetHelper, {lifecycle: Lifecycle.Singleton}); con.register("ProfileHelper", {useClass: ProfileHelper}); con.register("QuestHelper", {useClass: QuestHelper}); con.register("QuestConditionHelper", QuestConditionHelper); con.register("RagfairHelper", {useClass: RagfairHelper}); con.register("RagfairSortHelper", {useClass: RagfairSortHelper}); con.register("RagfairSellHelper", {useClass: RagfairSellHelper}); con.register("RagfairOfferHelper", {useClass: RagfairOfferHelper}); con.register("RagfairServerHelper", {useClass: RagfairServerHelper}); con.register("RepairHelper", {useClass: RepairHelper}); con.register("TraderHelper", TraderHelper); con.register("TraderAssortHelper", TraderAssortHelper, {lifecycle: Lifecycle.Singleton}); con.register("TradeHelper", {useClass: TradeHelper}); con.register("NotifierHelper", {useClass: NotifierHelper}); con.register("UtilityHelper", UtilityHelper); con.register("WeightedRandomHelper", {useClass: WeightedRandomHelper}); con.register("HttpServerHelper", {useClass: HttpServerHelper}); con.register("NotificationSendHelper", {useClass: NotificationSendHelper}); con.register("SecureContainerHelper", {useClass: SecureContainerHelper}); con.register("ProbabilityHelper", {useClass: ProbabilityHelper}); con.register("BotWeaponGeneratorHelper", {useClass: BotWeaponGeneratorHelper}); con.register("BotDifficultyHelper", {useClass: BotDifficultyHelper}); con.register("RepeatableQuestHelper", {useClass: RepeatableQuestHelper}); } private static registerLoaders(con: DependencyContainer): void { // Loaders con.register("BundleLoader", BundleLoader, {lifecycle: Lifecycle.Singleton}); con.register("PreAkiModLoader", PreAkiModLoader, {lifecycle: Lifecycle.Singleton}); con.register("PostAkiModLoader", PostAkiModLoader, {lifecycle: Lifecycle.Singleton}); } private static registerCallbacks(con: DependencyContainer): void { // Callbacks con.register("BotCallbacks", {useClass: BotCallbacks}); con.register("BundleCallbacks", {useClass: BundleCallbacks}); con.register("ClientLogCallbacks", {useClass: ClientLogCallbacks}); con.register("CustomizationCallbacks", {useClass: CustomizationCallbacks}); con.register("DataCallbacks", {useClass: DataCallbacks}); con.register("DialogueCallbacks", {useClass: DialogueCallbacks}); con.register("GameCallbacks", {useClass: GameCallbacks}); con.register("HandbookCallbacks", {useClass: HandbookCallbacks}); con.register("HealthCallbacks", {useClass: HealthCallbacks}); con.register("HideoutCallbacks", {useClass: HideoutCallbacks}); con.register("HttpCallbacks", {useClass: HttpCallbacks}); con.register("InraidCallbacks", {useClass: InraidCallbacks}); con.register("InsuranceCallbacks", {useClass: InsuranceCallbacks}); con.register("InventoryCallbacks", {useClass: InventoryCallbacks}); con.register("ItemEventCallbacks", {useClass: ItemEventCallbacks}); con.register("LauncherCallbacks", {useClass: LauncherCallbacks}); con.register("LocationCallbacks", {useClass: LocationCallbacks}); con.register("MatchCallbacks", {useClass: MatchCallbacks}); con.register("ModCallbacks", {useClass: ModCallbacks}); con.register("PostDBModLoader", {useClass: PostDBModLoader}); con.register("NoteCallbacks", {useClass: NoteCallbacks}); con.register("NotifierCallbacks", {useClass: NotifierCallbacks}); con.register("PresetBuildCallbacks", {useClass: PresetBuildCallbacks}); con.register("PresetCallbacks", {useClass: PresetCallbacks}); con.register("ProfileCallbacks", {useClass: ProfileCallbacks}); con.register("QuestCallbacks", {useClass: QuestCallbacks}); con.register("RagfairCallbacks", {useClass: RagfairCallbacks}); con.register("RepairCallbacks", {useClass: RepairCallbacks}); con.register("SaveCallbacks", {useClass: SaveCallbacks}); con.register("TradeCallbacks", {useClass: TradeCallbacks}); con.register("TraderCallbacks", {useClass: TraderCallbacks}); con.register("WeatherCallbacks", {useClass: WeatherCallbacks}); con.register("WishlistCallbacks", {useClass: WishlistCallbacks}); } private static registerServices(con: DependencyContainer): void { // Services con.register("ImageRouteService", ImageRouteService, {lifecycle: Lifecycle.Singleton}); con.register("FenceService", FenceService, {lifecycle: Lifecycle.Singleton}); con.register("PlayerService", {useClass: PlayerService}); con.register("PaymentService", {useClass: PaymentService}); con.register("InsuranceService", InsuranceService, {lifecycle: Lifecycle.Singleton}); con.register("TraderAssortService", TraderAssortService, {lifecycle: Lifecycle.Singleton}); con.register("RagfairPriceService", RagfairPriceService, {lifecycle: Lifecycle.Singleton}); con.register("RagfairCategoriesService", RagfairCategoriesService, { lifecycle: Lifecycle.Singleton, }); con.register("RagfairOfferService", RagfairOfferService, {lifecycle: Lifecycle.Singleton}); con.register("RagfairLinkedItemService", RagfairLinkedItemService, { lifecycle: Lifecycle.Singleton, }); con.register("RagfairRequiredItemsService", RagfairRequiredItemsService, { lifecycle: Lifecycle.Singleton, }); con.register("NotificationService", NotificationService, {lifecycle: Lifecycle.Singleton}); con.register("MatchLocationService", MatchLocationService, { lifecycle: Lifecycle.Singleton, }); con.register("ModCompilerService", ModCompilerService); con.register("HashCacheService", HashCacheService, {lifecycle: Lifecycle.Singleton}); con.register("LocaleService", LocaleService, {lifecycle: Lifecycle.Singleton}); con.register("ProfileFixerService", ProfileFixerService); con.register("RepairService", RepairService); con.register("BotLootCacheService", BotLootCacheService, {lifecycle: Lifecycle.Singleton}); con.register("CustomItemService", CustomItemService); con.register("BotEquipmentFilterService", BotEquipmentFilterService); con.register("ProfileSnapshotService", ProfileSnapshotService, { lifecycle: Lifecycle.Singleton, }); con.register("ItemFilterService", ItemFilterService, {lifecycle: Lifecycle.Singleton}); con.register("BotGenerationCacheService", BotGenerationCacheService, { lifecycle: Lifecycle.Singleton, }); con.register("LocalisationService", LocalisationService, {lifecycle: Lifecycle.Singleton}); con.register("CustomLocationWaveService", CustomLocationWaveService, { lifecycle: Lifecycle.Singleton, }); con.register("OpenZoneService", OpenZoneService, {lifecycle: Lifecycle.Singleton}); con.register("ItemBaseClassService", ItemBaseClassService, { lifecycle: Lifecycle.Singleton, }); con.register("BotEquipmentModPoolService", BotEquipmentModPoolService, { lifecycle: Lifecycle.Singleton, }); con.register("BotWeaponModLimitService", BotWeaponModLimitService, { lifecycle: Lifecycle.Singleton, }); con.register("SeasonalEventService", SeasonalEventService, { lifecycle: Lifecycle.Singleton, }); con.register("MatchBotDetailsCacheService", MatchBotDetailsCacheService, { lifecycle: Lifecycle.Singleton, }); con.register("RagfairTaxService", RagfairTaxService, {lifecycle: Lifecycle.Singleton}); con.register("TraderPurchasePersisterService", TraderPurchasePersisterService); con.register("PmcChatResponseService", PmcChatResponseService); con.register("GiftService", GiftService); con.register("MailSendService", MailSendService); } private static registerServers(con: DependencyContainer): void { // Servers con.register("DatabaseServer", DatabaseServer, {lifecycle: Lifecycle.Singleton}); con.register("HttpServer", HttpServer, {lifecycle: Lifecycle.Singleton}); con.register("WebSocketServer", WebSocketServer, {lifecycle: Lifecycle.Singleton}); con.register("RagfairServer", RagfairServer); con.register("SaveServer", SaveServer, {lifecycle: Lifecycle.Singleton}); con.register("ConfigServer", ConfigServer, {lifecycle: Lifecycle.Singleton}); } private static registerControllers(con: DependencyContainer): void { // Controllers con.register("BotController", {useClass: BotController}); con.register("ClientLogController", {useClass: ClientLogController}); con.register("CustomizationController", {useClass: CustomizationController}); con.register("DialogueController", {useClass: DialogueController}); con.register("GameController", {useClass: GameController}); con.register("HandbookController", {useClass: HandbookController}); con.register("HealthController", {useClass: HealthController}); con.register("HideoutController", {useClass: HideoutController}); con.register("InraidController", {useClass: InraidController}); con.register("InsuranceController", {useClass: InsuranceController}); con.register("InventoryController", {useClass: InventoryController}); con.register("LauncherController", {useClass: LauncherController}); con.register("LocationController", {useClass: LocationController}); con.register("MatchController", MatchController); con.register("NoteController", {useClass: NoteController}); con.register("NotifierController", {useClass: NotifierController}); con.register("PresetBuildController", {useClass: PresetBuildController}); con.register("PresetController", {useClass: PresetController}); con.register("ProfileController", {useClass: ProfileController}); con.register("QuestController", {useClass: QuestController}); con.register("RagfairController", {useClass: RagfairController}); con.register("RepairController", {useClass: RepairController}); con.register("RepeatableQuestController", {useClass: RepeatableQuestController}); con.register("TradeController", {useClass: TradeController}); con.register("TraderController", {useClass: TraderController}); con.register("WeatherController", {useClass: WeatherController}); con.register("WishlistController", WishlistController); } }