| | 1 | | using DCL.NotificationModel; |
| | 2 | | using UnityEngine; |
| | 3 | |
|
| | 4 | | public static class WelcomeNotification |
| | 5 | | { |
| | 6 | | const int NOTIFICATION_DURATION = 5; |
| | 7 | |
|
| | 8 | | public static Model Get() |
| | 9 | | { |
| 0 | 10 | | string notificationText = $"Welcome, {UserProfile.GetOwnUserProfile().userName}!"; |
| 0 | 11 | | Vector2Int currentCoords = CommonScriptableObjects.playerCoords.Get(); |
| 0 | 12 | | string parcelName = MinimapMetadata.GetMetadata().GetSceneInfo(currentCoords.x, currentCoords.y)?.name; |
| | 13 | |
|
| 0 | 14 | | if (!string.IsNullOrEmpty(parcelName)) |
| | 15 | | { |
| 0 | 16 | | notificationText += $" You are in {parcelName} {currentCoords.x}, {currentCoords.y}"; |
| | 17 | | } |
| | 18 | |
|
| 0 | 19 | | return new Model() |
| | 20 | | { |
| | 21 | | message = notificationText, |
| | 22 | | scene = "", |
| | 23 | | type = Type.GENERIC_WITHOUT_BUTTON, |
| | 24 | | timer = NOTIFICATION_DURATION |
| | 25 | | }; |
| | 26 | | } |
| | 27 | | } |