| | 1 | | using DCL.ECS7; |
| | 2 | | using DCL.Emotes; |
| | 3 | | using DCL.EmotesWheel; |
| | 4 | | using DCL.EquippedEmotes; |
| | 5 | | using DCL.ExperiencesViewer; |
| | 6 | | using DCL.Helpers; |
| | 7 | | using DCL.Skybox; |
| | 8 | | using DCL.Tutorial; |
| | 9 | | using DCLPlugins.UIRefresherPlugin; |
| | 10 | |
|
| | 11 | | namespace DCL |
| | 12 | | { |
| | 13 | | public static class PluginSystemFactory |
| | 14 | | { |
| | 15 | | public static PluginSystem Create() |
| | 16 | | { |
| 0 | 17 | | var pluginSystem = new PluginSystem(); |
| | 18 | |
|
| | 19 | | // Ideally the Plugin class itself should be a really small entry point with a parameterless constructor |
| | 20 | | // the heavy lifting should be done by another class (following the Humble Object Pattern) |
| | 21 | |
|
| 0 | 22 | | pluginSystem.Register<DebugPluginFeature>(() => new DebugPluginFeature()); |
| 0 | 23 | | pluginSystem.Register<ShortcutsFeature>(() => new ShortcutsFeature()); |
| 0 | 24 | | pluginSystem.Register<ExploreV2Feature>(() => new ExploreV2Feature()); |
| 0 | 25 | | pluginSystem.Register<DebugShapesBoundingBoxDisplayer>(() => new DebugShapesBoundingBoxDisplayer()); |
| 0 | 26 | | pluginSystem.Register<TransactionFeature>(() => new TransactionFeature()); |
| 0 | 27 | | pluginSystem.Register<PreviewMenuPlugin>(() => new PreviewMenuPlugin()); |
| 0 | 28 | | pluginSystem.Register<SkyboxController>(() => new SkyboxController()); |
| 0 | 29 | | pluginSystem.Register<GotoPanelPlugin>(() => new GotoPanelPlugin()); |
| 0 | 30 | | pluginSystem.Register<ExperiencesViewerFeature>(() => new ExperiencesViewerFeature()); |
| 0 | 31 | | pluginSystem.Register<EmoteAnimationsPlugin>(() => new EmoteAnimationsPlugin()); |
| 0 | 32 | | pluginSystem.Register<EquippedEmotesInitializerPlugin>(() => new EquippedEmotesInitializerPlugin()); |
| 0 | 33 | | pluginSystem.Register<EmotesWheelUIPlugin>(() => new EmotesWheelUIPlugin()); |
| 0 | 34 | | pluginSystem.Register<NFTShapePlugin>(() => new NFTShapePlugin()); |
| 0 | 35 | | pluginSystem.Register<UUIDEventsPlugin>(() => new UUIDEventsPlugin()); |
| 0 | 36 | | pluginSystem.Register<UIComponentsPlugin>(() => new UIComponentsPlugin()); |
| 0 | 37 | | pluginSystem.Register<CoreComponentsPlugin>(() => new CoreComponentsPlugin()); |
| 0 | 38 | | pluginSystem.Register<PlacesAndEventsFeature>(() => new PlacesAndEventsFeature()); |
| 0 | 39 | | pluginSystem.Register<AvatarModifierAreaFeedbackPlugin>(() => new AvatarModifierAreaFeedbackPlugin()); |
| 0 | 40 | | pluginSystem.Register<SpawnPointsDisplayerPlugin>(() => new SpawnPointsDisplayerPlugin()); |
| 0 | 41 | | pluginSystem.Register<UIRefresherPlugin>(() => new UIRefresherPlugin()); |
| | 42 | |
|
| 0 | 43 | | pluginSystem.RegisterWithFlag<BuilderInWorldPlugin>(() => new BuilderInWorldPlugin(), "builder_in_world"); |
| 0 | 44 | | pluginSystem.RegisterWithFlag<TutorialController>(() => new TutorialController(), "tutorial"); |
| 0 | 45 | | pluginSystem.RegisterWithFlag<TextureCompressionTogglePlugin>(() => new TextureCompressionTogglePlugin(), "p |
| 0 | 46 | | pluginSystem.RegisterWithFlag<ECS7Plugin>(() => new ECS7Plugin(), "ecs7"); |
| 0 | 47 | | pluginSystem.RegisterWithFlag<BlurFeature>(() => new BlurFeature(), "ui_blur"); |
| 0 | 48 | | pluginSystem.Register<FriendsNotificationPlugin>(() => new FriendsNotificationPlugin(new DefaultPlayerPrefs( |
| | 49 | | FriendsController.i, |
| | 50 | | NotificationScriptableObjects.pendingFriendRequests, |
| | 51 | | NotificationScriptableObjects.newApprovedFriends, |
| | 52 | | DataStore.i)); |
| | 53 | |
|
| 0 | 54 | | pluginSystem.SetFeatureFlagsData(DataStore.i.featureFlags.flags); |
| | 55 | |
|
| 0 | 56 | | return pluginSystem; |
| | 57 | | } |
| | 58 | | } |
| | 59 | | } |