| | 1 | | using AvatarSystem; |
| | 2 | | using DCL; |
| | 3 | | using DCL.ProfanityFiltering; |
| | 4 | | using DCL.Social.Friends; |
| | 5 | | using DCl.Social.Passports; |
| | 6 | | using DCL.Social.Passports; |
| | 7 | | using DCLServices.CopyPaste.Analytics; |
| | 8 | | using DCLServices.Lambdas.LandsService; |
| | 9 | | using DCLServices.Lambdas.NamesService; |
| | 10 | | using DCLServices.WearablesCatalogService; |
| | 11 | | using MainScripts.DCL.Controllers.HUD.CharacterPreview; |
| | 12 | | using SocialFeaturesAnalytics; |
| | 13 | | using UnityEngine; |
| | 14 | |
|
| | 15 | | public class PlayerPassportPlugin : IPlugin |
| | 16 | | { |
| | 17 | | private readonly PlayerPassportHUDController passportController; |
| | 18 | |
|
| 0 | 19 | | public PlayerPassportPlugin() |
| | 20 | | { |
| 0 | 21 | | PlayerPassportReferenceContainer referenceContainer = Object.Instantiate(Resources.Load<GameObject>("PlayerPassp |
| | 22 | | .GetComponent<PlayerPassportReferenceContainer>(); |
| 0 | 23 | | referenceContainer.PlayerPreviewView.Initialize(new PreviewCameraRotationController()); |
| | 24 | |
|
| 0 | 25 | | var wearablesCatalogService = Environment.i.serviceLocator.Get<IWearablesCatalogService>(); |
| | 26 | |
|
| 0 | 27 | | passportController = new PlayerPassportHUDController( |
| | 28 | | referenceContainer.PassportView, |
| | 29 | | new PassportPlayerInfoComponentController( |
| | 30 | | referenceContainer.PlayerInfoView, |
| | 31 | | DataStore.i, |
| | 32 | | Environment.i.serviceLocator.Get<IProfanityFilter>(), |
| | 33 | | Environment.i.serviceLocator.Get<IFriendsController>(), |
| | 34 | | new UserProfileWebInterfaceBridge(), |
| | 35 | | new SocialAnalytics( |
| | 36 | | Environment.i.platform.serviceProviders.analytics, |
| | 37 | | new UserProfileWebInterfaceBridge()), |
| | 38 | | Environment.i.platform.clipboard, |
| | 39 | | new WebInterfacePassportApiBridge()), |
| | 40 | | new PassportPlayerPreviewComponentController( |
| | 41 | | referenceContainer.PlayerPreviewView, |
| | 42 | | new SocialAnalytics( |
| | 43 | | Environment.i.platform.serviceProviders.analytics, |
| | 44 | | new UserProfileWebInterfaceBridge())), |
| | 45 | | new PassportNavigationComponentController( |
| | 46 | | referenceContainer.PassportNavigationView, |
| | 47 | | Environment.i.serviceLocator.Get<IProfanityFilter>(), |
| | 48 | | new WearableItemResolver(wearablesCatalogService), |
| | 49 | | wearablesCatalogService, |
| | 50 | | Environment.i.serviceLocator.Get<IEmotesCatalogService>(), |
| | 51 | | Environment.i.serviceLocator.Get<INamesService>(), |
| | 52 | | Environment.i.serviceLocator.Get<ILandsService>(), |
| | 53 | | new UserProfileWebInterfaceBridge(), |
| | 54 | | DataStore.i, |
| | 55 | | new ViewAllComponentController( |
| | 56 | | referenceContainer.ViewAllView, |
| | 57 | | DataStore.i.HUDs, |
| | 58 | | Environment.i.serviceLocator.Get<IWearablesCatalogService>(), |
| | 59 | | Environment.i.serviceLocator.Get<ILandsService>(), |
| | 60 | | Environment.i.serviceLocator.Get<INamesService>(), |
| | 61 | | NotificationsController.i), |
| | 62 | | referenceContainer.PassportNavigationView, |
| | 63 | | Clipboard.Create(), |
| | 64 | | Environment.i.serviceLocator.Get<ICopyPasteAnalyticsService>()), |
| | 65 | | new UserProfileWebInterfaceBridge(), |
| | 66 | | new WebInterfacePassportApiBridge(), |
| | 67 | | new SocialAnalytics( |
| | 68 | | Environment.i.platform.serviceProviders.analytics, |
| | 69 | | new UserProfileWebInterfaceBridge()), |
| | 70 | | DataStore.i, |
| | 71 | | SceneReferences.i.mouseCatcher, |
| | 72 | | CommonScriptableObjects.playerInfoCardVisibleState); |
| 0 | 73 | | } |
| | 74 | |
|
| | 75 | | public void Dispose() |
| | 76 | | { |
| 0 | 77 | | passportController?.Dispose(); |
| 0 | 78 | | } |
| | 79 | | } |