Objective images in map planner Closes #1221
Some checks failed
Tests and checks on push / run-checks-and-tests (push) Has been cancelled
Updates translation progress / update-translation-progress-issue (push) Has been cancelled

This commit is contained in:
Kalle 2024-11-18 23:30:44 +02:00
parent a4073e6564
commit e59b2718c8
2 changed files with 28 additions and 1 deletions

View File

@ -30,6 +30,7 @@ import {
import { modesShort } from "~/modules/in-game-lists/modes";
import {
mainWeaponImageUrl,
modeImageUrl,
outlinedMainWeaponImageUrl,
specialWeaponImageUrl,
stageMinimapImageUrlWithEnding,
@ -294,7 +295,7 @@ function WeaponImageSelector({
}: {
handleAddWeapon: (src: string) => void;
}) {
const { t, i18n } = useTranslation(["weapons", "common"]);
const { t, i18n } = useTranslation(["weapons", "common", "game-misc"]);
const isWide = i18n.language === "fr";
@ -403,6 +404,31 @@ function WeaponImageSelector({
})}
</div>
</details>
<details>
<summary className="plans__weapons-summary">
<Image path={modeImageUrl("RM")} width={24} height={24} alt="" />
{t("common:plans.adder.objective")}
</summary>
<div className="plans__weapons-container">
{(["TC", "RM", "CB"] as const).map((mode) => {
return (
<Button
key={mode}
variant="minimal"
onClick={() => handleAddWeapon(`${modeImageUrl(mode)}.png`)}
>
<Image
alt={t(`game-misc:MODE_LONG_${mode}`)}
title={t(`game-misc:MODE_LONG_${mode}`)}
path={modeImageUrl(mode)}
width={28}
height={28}
/>
</Button>
);
})}
</div>
</details>
</div>
);
}

View File

@ -153,6 +153,7 @@
"plans.blueprint": "Blueprint",
"plans.bgStyle.OVER": "Overhead",
"plans.bgStyle.MINI": "Minimap",
"plans.adder.objective": "Objective",
"articles.by": "by {{author}}",