From 45caf0e2c237f13b4379401044eab1f75efdeace Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Tue, 4 Aug 2026 20:03:39 +0300 Subject: [PATCH] Add Mahi-Mahi Resort water down images to map planner --- .../map-planner/components/Planner.tsx | 26 +++++++++++++++++-- app/features/map-planner/index.ts | 1 - app/features/map-planner/plans-types.ts | 2 ++ app/utils/urls.ts | 12 +++++++-- locales/da/common.json | 2 ++ locales/de/common.json | 2 ++ locales/en/common.json | 2 ++ locales/es-ES/common.json | 2 ++ locales/es-US/common.json | 2 ++ locales/fr-CA/common.json | 2 ++ locales/fr-EU/common.json | 2 ++ locales/he/common.json | 2 ++ locales/it/common.json | 2 ++ locales/ja/common.json | 2 ++ locales/ko/common.json | 2 ++ locales/nl/common.json | 2 ++ locales/pl/common.json | 2 ++ locales/pt-BR/common.json | 2 ++ locales/ru/common.json | 2 ++ locales/zh/common.json | 2 ++ 20 files changed, 68 insertions(+), 5 deletions(-) delete mode 100644 app/features/map-planner/index.ts diff --git a/app/features/map-planner/components/Planner.tsx b/app/features/map-planner/components/Planner.tsx index 7cb097651..fa79d8351 100644 --- a/app/features/map-planner/components/Planner.tsx +++ b/app/features/map-planner/components/Planner.tsx @@ -38,7 +38,7 @@ import { getWeaponRange } from "~/features/comp-analyzer/core/weapon-range"; import { useTheme } from "~/features/theme/core/provider"; import type { LanguageCode } from "~/modules/i18n/config"; import { modesShort } from "~/modules/in-game-lists/modes"; -import { stageIds } from "~/modules/in-game-lists/stage-ids"; +import { stageIds, stagesObj } from "~/modules/in-game-lists/stage-ids"; import type { MainWeaponId, ModeShort, @@ -63,6 +63,7 @@ import { } from "~/utils/urls"; import { LinkButton, SendouButton } from "../../../components/elements/Button"; import { Image } from "../../../components/Image"; +import type { StageWaterLevel } from "../plans-types"; import styles from "./Planner.module.css"; const DROPPED_IMAGE_SIZE_PX = 45; @@ -317,6 +318,7 @@ export default function Planner() { stageId: StageId; mode: ModeShort; style: "MINI" | "OVER"; + waterLevel: StageWaterLevel; }) => { if (!editor) return; @@ -672,6 +674,7 @@ function StageBackgroundSelector({ stageId: StageId; mode: ModeShort; style: "MINI" | "OVER"; + waterLevel: StageWaterLevel; }) => void; }) { const { t } = useTranslation(["game-misc", "common"]); @@ -680,9 +683,13 @@ function StageBackgroundSelector({ const [backgroundStyle, setBackgroundStyle] = React.useState<"MINI" | "OVER">( "MINI", ); + const [waterLevel, setWaterLevel] = React.useState("up"); const handleStageIdChange = (stageId: StageId) => { setStageId(stageId); + if (stageId !== stagesObj.MAHI_MAHI_RESORT) { + setWaterLevel("up"); + } }; return ( @@ -729,9 +736,24 @@ function StageBackgroundSelector({ ); })} + {stageId === stagesObj.MAHI_MAHI_RESORT ? ( + + ) : null} - onAddBackground({ style: backgroundStyle, stageId, mode }) + onAddBackground({ style: backgroundStyle, stageId, mode, waterLevel }) } className="w-max" > diff --git a/app/features/map-planner/index.ts b/app/features/map-planner/index.ts deleted file mode 100644 index d71daeb2d..000000000 --- a/app/features/map-planner/index.ts +++ /dev/null @@ -1 +0,0 @@ -export type { StageBackgroundStyle } from "./plans-types"; diff --git a/app/features/map-planner/plans-types.ts b/app/features/map-planner/plans-types.ts index 1928b9bce..f6a3d6dc6 100644 --- a/app/features/map-planner/plans-types.ts +++ b/app/features/map-planner/plans-types.ts @@ -1 +1,3 @@ export type StageBackgroundStyle = "OVER" | "MINI" | "ITEMS"; + +export type StageWaterLevel = "up" | "down"; diff --git a/app/utils/urls.ts b/app/utils/urls.ts index 9d6d28b91..f4db1941d 100644 --- a/app/utils/urls.ts +++ b/app/utils/urls.ts @@ -20,7 +20,10 @@ import { leaderboardsSearchParams } from "~/features/leaderboards/leaderboards-s import { lfgNewSearchParams } from "~/features/lfg/lfg-search-params"; import type { MapPool } from "~/features/map-list-generator/core/map-pool"; import { mapListGeneratorSearchParams } from "~/features/map-list-generator/map-list-generator-search-params"; -import type { StageBackgroundStyle } from "~/features/map-planner"; +import type { + StageBackgroundStyle, + StageWaterLevel, +} from "~/features/map-planner/plans-types"; import type { TierName } from "~/features/mmr/mmr-constants"; import { calculatorSearchParams } from "~/features/object-damage-calculator/calculator-search-params"; import { @@ -653,11 +656,16 @@ export const stageMinimapImageUrlWithEnding = ({ stageId, mode, style, + waterLevel, }: { stageId: StageId; mode: ModeShort; style: StageBackgroundStyle; -}) => `${STATIC_ASSETS_URL}/planner-maps/${stageId}-${mode}-${style}.png`; + waterLevel?: StageWaterLevel; +}) => + `${STATIC_ASSETS_URL}/planner-maps/${stageId}-${mode}-${style}${ + waterLevel === "down" ? "-DOWN" : "" + }.png`; export function resolveBaseUrl(url: string) { return new URL(url).host; diff --git a/locales/da/common.json b/locales/da/common.json index 112f3a52c..ffe1b03cc 100644 --- a/locales/da/common.json +++ b/locales/da/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "", "plans.adder.objective": "", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "af {{author}}", "theme.light": "Lyst", "theme.dark": "Mørkt", diff --git a/locales/de/common.json b/locales/de/common.json index 4b9761897..b17680f8a 100644 --- a/locales/de/common.json +++ b/locales/de/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "", "plans.adder.objective": "", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "von {{author}}", "theme.light": "Hell", "theme.dark": "Dunkel", diff --git a/locales/en/common.json b/locales/en/common.json index 8afa07bef..48fd66587 100644 --- a/locales/en/common.json +++ b/locales/en/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "Minimap", "plans.adder.objective": "Objective", "plans.ranges": "Ranges", + "plans.waterLevel.up": "Water up", + "plans.waterLevel.down": "Water down", "articles.by": "by {{author}}", "theme.light": "Light", "theme.dark": "Dark", diff --git a/locales/es-ES/common.json b/locales/es-ES/common.json index ef9be99dc..3034df699 100644 --- a/locales/es-ES/common.json +++ b/locales/es-ES/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "Minimapa", "plans.adder.objective": "Objetivo", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "por {{author}}", "theme.light": "Claro", "theme.dark": "Oscuro", diff --git a/locales/es-US/common.json b/locales/es-US/common.json index f6de7af79..b32a8685e 100644 --- a/locales/es-US/common.json +++ b/locales/es-US/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "", "plans.adder.objective": "", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "por {{author}}", "theme.light": "Claro", "theme.dark": "Oscuro", diff --git a/locales/fr-CA/common.json b/locales/fr-CA/common.json index db450b543..45afff4cb 100644 --- a/locales/fr-CA/common.json +++ b/locales/fr-CA/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "", "plans.adder.objective": "", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "par {{author}}", "theme.light": "Clair", "theme.dark": "Sombre", diff --git a/locales/fr-EU/common.json b/locales/fr-EU/common.json index 262b476d2..ffaf2ed94 100644 --- a/locales/fr-EU/common.json +++ b/locales/fr-EU/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "Minimap", "plans.adder.objective": "Objectif", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "par {{author}}", "theme.light": "Clair", "theme.dark": "Sombre", diff --git a/locales/he/common.json b/locales/he/common.json index 8f48b66e0..e4ed65238 100644 --- a/locales/he/common.json +++ b/locales/he/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "", "plans.adder.objective": "", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "מאת {{author}}", "theme.light": "בהיר", "theme.dark": "חשוך", diff --git a/locales/it/common.json b/locales/it/common.json index 73d395e4b..a517dff84 100644 --- a/locales/it/common.json +++ b/locales/it/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "Minimappa", "plans.adder.objective": "Obiettivo", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "da {{author}}", "theme.light": "Light", "theme.dark": "Dark", diff --git a/locales/ja/common.json b/locales/ja/common.json index c4cdb53f1..2bc3333fb 100644 --- a/locales/ja/common.json +++ b/locales/ja/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "ミニマップ", "plans.adder.objective": "ルール関与系", "plans.ranges": "射程", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "作者: {{author}}", "theme.light": "ライトモード", "theme.dark": "ダークモード", diff --git a/locales/ko/common.json b/locales/ko/common.json index bd7adc88a..c30c56595 100644 --- a/locales/ko/common.json +++ b/locales/ko/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "", "plans.adder.objective": "", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "{{author}} 작성", "theme.light": "라이트", "theme.dark": "다크", diff --git a/locales/nl/common.json b/locales/nl/common.json index d45598651..ba058e330 100644 --- a/locales/nl/common.json +++ b/locales/nl/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "", "plans.adder.objective": "", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "", "theme.light": "", "theme.dark": "", diff --git a/locales/pl/common.json b/locales/pl/common.json index b92241893..8e08b880a 100644 --- a/locales/pl/common.json +++ b/locales/pl/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "", "plans.adder.objective": "", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "napisane przez {{author}}", "theme.light": "Jasny", "theme.dark": "Ciemny", diff --git a/locales/pt-BR/common.json b/locales/pt-BR/common.json index 5ab4b754b..a1404b3fa 100644 --- a/locales/pt-BR/common.json +++ b/locales/pt-BR/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "", "plans.adder.objective": "", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "por/pela {{author}}", "theme.light": "Claro", "theme.dark": "Escuro", diff --git a/locales/ru/common.json b/locales/ru/common.json index d4891bcd4..0ddd3162e 100644 --- a/locales/ru/common.json +++ b/locales/ru/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "Миникарта", "plans.adder.objective": "Цель", "plans.ranges": "", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "от {{author}}", "theme.light": "Светлая", "theme.dark": "Тёмная", diff --git a/locales/zh/common.json b/locales/zh/common.json index 5407ef986..3fde9a571 100644 --- a/locales/zh/common.json +++ b/locales/zh/common.json @@ -256,6 +256,8 @@ "plans.bgStyle.MINI": "小地图", "plans.adder.objective": "目标", "plans.ranges": "射程", + "plans.waterLevel.up": "", + "plans.waterLevel.down": "", "articles.by": "作者: {{author}}", "theme.light": "浅色", "theme.dark": "深色",