diff --git a/app/features/map-planner/components/Planner.tsx b/app/features/map-planner/components/Planner.tsx index 0b4206e71..935041b8c 100644 --- a/app/features/map-planner/components/Planner.tsx +++ b/app/features/map-planner/components/Planner.tsx @@ -12,14 +12,17 @@ import invariant from "tiny-invariant"; import { useForceRefreshOnMount } from "~/hooks/useForceRefresh"; import { useTranslation } from "~/hooks/useTranslation"; import type { LanguageCode } from "~/modules/i18n"; -import type { MainWeaponId, ModeShort, StageId } from "~/modules/in-game-lists"; +import type { ModeShort, StageId } from "~/modules/in-game-lists"; +import { specialWeaponIds, subWeaponIds } from "~/modules/in-game-lists"; import { stageIds, weaponCategories } from "~/modules/in-game-lists"; import { modesShort } from "~/modules/in-game-lists/modes"; import { semiRandomId } from "~/utils/strings"; import { mainWeaponImageUrl, outlinedMainWeaponImageUrl, + specialWeaponImageUrl, stageMinimapImageUrlWithEnding, + subWeaponImageUrl, TLDRAW_URL, weaponCategoryUrl, } from "~/utils/urls"; @@ -99,9 +102,9 @@ export default function Planner() { ); const handleAddWeapon = React.useCallback( - (weaponId: MainWeaponId) => { + (src: string) => { handleAddImage({ - src: `${outlinedMainWeaponImageUrl(weaponId)}.png`, + src, size: [45, 45], isLocked: false, point: [randomInt(250, 1000), randomInt(250, 750)], @@ -141,7 +144,7 @@ export default function Planner() { function WeaponImageSelector({ handleAddWeapon, }: { - handleAddWeapon: (weaponId: MainWeaponId) => void; + handleAddWeapon: (src: string) => void; }) { const { t } = useTranslation(["weapons", "common"]); return ( @@ -164,7 +167,11 @@ function WeaponImageSelector({ + ); + })} + + +
+ + + {t("common:weapon.category.specials")} + +
+ {specialWeaponIds.map((specialWeaponId) => { + return ( + + ); + })} +
+
); } diff --git a/app/features/map-planner/plans.css b/app/features/map-planner/plans.css index 813aeb94f..7bb7bc454 100644 --- a/app/features/map-planner/plans.css +++ b/app/features/map-planner/plans.css @@ -74,7 +74,8 @@ button[data-state="closed"][aria-haspopup="dialog"] { display: flex; flex-wrap: wrap; justify-content: center; - padding: var(--s-2); + padding: var(--s-1-5); + gap: var(--s-1-5); } .plans__powered-by { diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 2c86b7f11..f3bc0dd6b 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -105,6 +105,8 @@ "weapon.category.BRELLAS": "Brellas", "weapon.category.STRINGERS": "Stringers", "weapon.category.SPLATANAS": "Splatanas", + "weapon.category.subs": "Subs", + "weapon.category.specials": "Specials", "plans.poweredBy": "Powered by {{name}}", "plans.blueprint": "Blueprint",