diff --git a/public/assets/world/UI/ebike.webm b/public/assets/world/UI/ebike-mission-notification.webm similarity index 100% rename from public/assets/world/UI/ebike.webm rename to public/assets/world/UI/ebike-mission-notification.webm diff --git a/public/assets/world/UI/laferme.webm b/public/assets/world/UI/farm-mission-notification.webm similarity index 100% rename from public/assets/world/UI/laferme.webm rename to public/assets/world/UI/farm-mission-notification.webm diff --git a/public/assets/world/UI/centrale.webm b/public/assets/world/UI/pylon-mission-notification.webm similarity index 100% rename from public/assets/world/UI/centrale.webm rename to public/assets/world/UI/pylon-mission-notification.webm diff --git a/src/components/ui/MissionNotification.tsx b/src/components/ui/MissionNotification.tsx index 439ed9f..7b64447 100644 --- a/src/components/ui/MissionNotification.tsx +++ b/src/components/ui/MissionNotification.tsx @@ -14,6 +14,7 @@ export function MissionNotification({ }: MissionNotificationProps): React.JSX.Element { const src = imagePath ?? (mission ? MISSION_NOTIFICATION_IMAGE_PATHS[mission] : ""); + const isVideo = src.toLowerCase().endsWith(".webm"); return (
- Nouvel objectif de mission + {isVideo ? ( +
); diff --git a/src/data/gameplay/missionNotifications.ts b/src/data/gameplay/missionNotifications.ts index 167a063..afbfbf0 100644 --- a/src/data/gameplay/missionNotifications.ts +++ b/src/data/gameplay/missionNotifications.ts @@ -5,7 +5,7 @@ export const INTRO_MISSION_NOTIFICATION_IMAGE_PATH = export const MISSION_NOTIFICATION_IMAGE_PATHS: Record = { - ebike: "/assets/world/UI/ebike-mission-notification.png", - pylon: "/assets/world/UI/pylon-mission-notification.png", - farm: "/assets/world/UI/farm-mission-notification.png", + ebike: "/assets/world/UI/ebike-mission-notification.webm", + pylon: "/assets/world/UI/pylon-mission-notification.webm", + farm: "/assets/world/UI/farm-mission-notification.webm", };