| | 1 | | using DCL.AvatarEditor; |
| | 2 | | using DCL.Backpack; |
| | 3 | | using DCL.Social.Chat; |
| | 4 | | using DCL.Chat.Notifications; |
| | 5 | | using DCL.ConfirmationPopup; |
| | 6 | | using DCL.ContentModeration; |
| | 7 | | using DCL.ECS7; |
| | 8 | | using DCL.Emotes; |
| | 9 | | using DCL.EmotesWheel; |
| | 10 | | using DCL.EquippedEmotes; |
| | 11 | | using DCL.ExperiencesViewer; |
| | 12 | | using DCL.Guests.HUD.ConnectWallet; |
| | 13 | | using DCL.Helpers; |
| | 14 | | using DCL.MyAccount; |
| | 15 | | using DCL.PortableExperiences.Confirmation; |
| | 16 | | using DCL.PortableExperiencesToggle; |
| | 17 | | using DCL.Providers; |
| | 18 | | using DCL.Skybox; |
| | 19 | | using DCL.Social.Friends; |
| | 20 | | using DCL.Tutorial; |
| | 21 | | using DCL.Wallet; |
| | 22 | | using DCLPlugins.CameraReelPlugin; |
| | 23 | | using DCLPlugins.ECS6.HidePortableExperiencesUiFeatureToggle; |
| | 24 | | using DCLPlugins.FallbackFontsLoader; |
| | 25 | | using DCLPlugins.LoadingScreenPlugin; |
| | 26 | | using DCLPlugins.RealmPlugin; |
| | 27 | | using DCLPlugins.SignupHUDPlugin; |
| | 28 | | using DCLPlugins.ToSPopupHUDPlugin; |
| | 29 | | using DCLPlugins.UIRefresherPlugin; |
| | 30 | |
|
| | 31 | | namespace DCL |
| | 32 | | { |
| | 33 | | public static class PluginSystemFactory |
| | 34 | | { |
| | 35 | | public static PluginSystem Create() |
| | 36 | | { |
| 0 | 37 | | var pluginSystem = new PluginSystem(); |
| | 38 | |
|
| | 39 | | // Ideally the Plugin class itself should be a really small entry point with a parameterless constructor |
| | 40 | | // the heavy lifting should be done by another class (following the Humble Object Pattern) |
| | 41 | |
|
| 0 | 42 | | pluginSystem.Register<DebugPluginFeature>(() => new DebugPluginFeature()); |
| 0 | 43 | | pluginSystem.Register<ShortcutsFeature>(() => new ShortcutsFeature()); |
| 0 | 44 | | pluginSystem.Register<ExploreV2Feature>(() => new ExploreV2Feature()); |
| 0 | 45 | | pluginSystem.Register<DebugShapesBoundingBoxDisplayer>(() => new DebugShapesBoundingBoxDisplayer()); |
| 0 | 46 | | pluginSystem.Register<TransactionFeature>(() => new TransactionFeature()); |
| 0 | 47 | | pluginSystem.Register<PreviewMenuPlugin>(() => new PreviewMenuPlugin()); |
| 0 | 48 | | pluginSystem.Register<SkyboxController>(() => new SkyboxController(DataStore.i)); |
| 0 | 49 | | pluginSystem.Register<ExperiencesViewerPlugin>(() => new ExperiencesViewerPlugin()); |
| 0 | 50 | | pluginSystem.RegisterWithFlag<ExperiencesConfirmationPlugin>(() => new ExperiencesConfirmationPlugin(), "px_ |
| 0 | 51 | | pluginSystem.Register<TeleportHUDPlugin>(() => new TeleportHUDPlugin()); |
| 0 | 52 | | pluginSystem.Register<EquippedEmotesInitializerPlugin>(() => new EquippedEmotesInitializerPlugin()); |
| 0 | 53 | | pluginSystem.Register<EmotesWheelUIPlugin>(() => new EmotesWheelUIPlugin()); |
| 0 | 54 | | pluginSystem.Register<NFTShapePlugin>(() => new NFTShapePlugin()); |
| 0 | 55 | | pluginSystem.Register<UUIDEventsPlugin>(() => new UUIDEventsPlugin()); |
| 0 | 56 | | pluginSystem.Register<UIComponentsPlugin>(() => new UIComponentsPlugin()); |
| 0 | 57 | | pluginSystem.Register<CoreComponentsPlugin>(() => new CoreComponentsPlugin()); |
| 0 | 58 | | pluginSystem.Register<PlacesAndEventsFeature>(() => new PlacesAndEventsFeature()); |
| 0 | 59 | | pluginSystem.Register<JoinChannelModalPlugin>(() => new JoinChannelModalPlugin()); |
| 0 | 60 | | pluginSystem.Register<ChannelLimitReachedWindowPlugin>(() => new ChannelLimitReachedWindowPlugin()); |
| 0 | 61 | | pluginSystem.Register<ChannelJoinErrorWindowPlugin>(() => new ChannelJoinErrorWindowPlugin()); |
| 0 | 62 | | pluginSystem.Register<ChannelLeaveErrorWindowPlugin>(() => new ChannelLeaveErrorWindowPlugin()); |
| 0 | 63 | | pluginSystem.Register<AvatarModifierAreaFeedbackPlugin>(() => new AvatarModifierAreaFeedbackPlugin()); |
| 0 | 64 | | pluginSystem.Register<SpawnPointsDisplayerPlugin>(() => new SpawnPointsDisplayerPlugin()); |
| 0 | 65 | | pluginSystem.Register<UIRefresherPlugin>(() => new UIRefresherPlugin()); |
| 0 | 66 | | pluginSystem.Register<ChatNotificationsFeature>(() => new ChatNotificationsFeature()); |
| 0 | 67 | | pluginSystem.Register<ConnectWalletModalPlugin>(() => new ConnectWalletModalPlugin()); |
| 0 | 68 | | pluginSystem.Register<FallbackFontsLoaderPlugin>(() => new FallbackFontsLoaderPlugin()); |
| 0 | 69 | | pluginSystem.Register<LoadingScreenPlugin>(() => new LoadingScreenPlugin()); |
| 0 | 70 | | pluginSystem.Register<SignupHUDPlugin>(() => new SignupHUDPlugin()); |
| 0 | 71 | | pluginSystem.Register<PortableExperiencesTogglePlugin>(() => new PortableExperiencesTogglePlugin()); |
| 0 | 72 | | pluginSystem.Register<HidePortableExperiencesUiPlugin>(() => new HidePortableExperiencesUiPlugin()); |
| | 73 | |
|
| 0 | 74 | | pluginSystem.Register<FriendRequestHUDPlugin>(() => new FriendRequestHUDPlugin()); |
| 0 | 75 | | pluginSystem.RegisterWithFlag<RealmPlugin>(() => new RealmPlugin(DataStore.i), "realms_modifier_plugin"); |
| | 76 | |
|
| 0 | 77 | | pluginSystem.RegisterWithFlag<TutorialController>(() => new TutorialController(DataStore.i.common, DataStore |
| 0 | 78 | | pluginSystem.RegisterWithFlag<TextureCompressionTogglePlugin>(() => new TextureCompressionTogglePlugin(), "p |
| 0 | 79 | | pluginSystem.RegisterWithFlag<ECS7Plugin>(() => new ECS7Plugin(), "ecs7"); |
| 0 | 80 | | pluginSystem.RegisterWithFlag<BlurFeature>(() => new BlurFeature(), "ui_blur_variant:enabled"); |
| 0 | 81 | | pluginSystem.RegisterWithFlag<PromoteChannelsToastPlugin>(() => new PromoteChannelsToastPlugin(), "promote_c |
| 0 | 82 | | pluginSystem.Register<PlayerPassportPlugin>(() => new PlayerPassportPlugin()); |
| 0 | 83 | | pluginSystem.RegisterWithFlag<FavoritePlacesPlugin>(() => new FavoritePlacesPlugin(), "favourite_places"); |
| 0 | 84 | | pluginSystem.RegisterWithFlag<OutlinerPlugin>(() => new OutlinerPlugin(), "avatar_outliner"); |
| 0 | 85 | | pluginSystem.RegisterWithFlag<LoadingScreenV2Plugin>(() => new LoadingScreenV2Plugin(), "loading_screen_v2") |
| 0 | 86 | | pluginSystem.RegisterWithFlag<ToSPopupHUDPlugin>(() => new ToSPopupHUDPlugin(), "seamless_login_variant"); |
| | 87 | |
|
| 0 | 88 | | pluginSystem.Register<FriendsNotificationPlugin>(() => new FriendsNotificationPlugin(new DefaultPlayerPrefs( |
| | 89 | | Environment.i.serviceLocator.Get<IFriendsController>(), |
| | 90 | | NotificationScriptableObjects.pendingFriendRequests, |
| | 91 | | NotificationScriptableObjects.newApprovedFriends, |
| | 92 | | DataStore.i)); |
| | 93 | |
|
| 0 | 94 | | pluginSystem.Register<ConfirmationPopupPlugin>(() => new ConfirmationPopupPlugin()); |
| | 95 | |
|
| 0 | 96 | | pluginSystem.Register<ABDetectorPlugin>(() => new ABDetectorPlugin()); |
| | 97 | |
|
| 0 | 98 | | pluginSystem.Register<MapTexturePlugin>(() => new MapTexturePlugin(Environment.i.serviceLocator.Get<IAddress |
| | 99 | |
|
| 0 | 100 | | pluginSystem.RegisterWithFlag<QuestsPlugin>(() => new QuestsPlugin(Environment.i.serviceLocator.Get<IAddress |
| 0 | 101 | | pluginSystem.RegisterWithFlag<BackpackEditorV2Plugin>(() => new BackpackEditorV2Plugin(), "backpack_editor_v |
| | 102 | | // TODO: remove the v1 backpack editor when v2 is confirmed to be completely functional |
| 0 | 103 | | pluginSystem.RegisterWithFlag<AvatarEditorHUDPlugin>(() => new AvatarEditorHUDPlugin(), "backpack_editor_v1" |
| 0 | 104 | | pluginSystem.RegisterWithFlag<CameraReelPlugin>(() => new CameraReelPlugin(), "camera_reel"); |
| | 105 | |
|
| 0 | 106 | | pluginSystem.RegisterWithFlag<WalletPlugin>(() => new WalletPlugin(), "wallet"); |
| 0 | 107 | | pluginSystem.RegisterWithFlag<MyAccountPlugin>(() => new MyAccountPlugin(), "my_account"); |
| 0 | 108 | | pluginSystem.RegisterWithFlag<ContentModerationPlugin>(() => new ContentModerationPlugin(), "content_moderat |
| | 109 | |
|
| 0 | 110 | | pluginSystem.SetFeatureFlagsData(DataStore.i.featureFlags.flags); |
| | 111 | |
|
| 0 | 112 | | return pluginSystem; |
| | 113 | | } |
| | 114 | | } |
| | 115 | | } |