diff --git a/components/WeaponSelector.tsx b/components/WeaponSelector.tsx index f44c94c53..e3e424e95 100644 --- a/components/WeaponSelector.tsx +++ b/components/WeaponSelector.tsx @@ -1,5 +1,5 @@ import { Select, Tag, TagCloseButton, TagLabel } from "@chakra-ui/core"; -import { weaponsWithHero } from "lib/lists/weaponsWithHero"; +import { weaponsWithHeroCategorized } from "lib/lists/weaponsWithHero"; import WeaponImage from "./WeaponImage"; interface Props { @@ -15,10 +15,14 @@ const WeaponSelector: React.FC = ({ name, value, onChange }) => { name={name} onChange={(e) => onChange(value.concat(e.target.value))} > - {weaponsWithHero.map((wpn) => ( - + {weaponsWithHeroCategorized.map((wpnCategory) => ( + + {wpnCategory.weapons.map((wpn) => ( + + ))} + ))} {value.map((wpn) => ( diff --git a/cypress/integration/planner.spec.ts b/cypress/integration/planner.spec.ts index 77270f2ac..a39ae273c 100644 --- a/cypress/integration/planner.spec.ts +++ b/cypress/integration/planner.spec.ts @@ -1,6 +1,6 @@ /// -describe.only("Map Planner", () => { +describe("Map Planner", () => { beforeEach(() => { cy.visit("/plans"); }); diff --git a/lib/lists/weaponsWithHero.ts b/lib/lists/weaponsWithHero.ts index e4b28fd77..3a413ee9b 100644 --- a/lib/lists/weaponsWithHero.ts +++ b/lib/lists/weaponsWithHero.ts @@ -139,3 +139,193 @@ export const weaponsWithHero = [ "Undercover Sorella Brella", "Kensa Undercover Brella", ] as const; + +export const weaponsWithHeroCategorized: readonly { + name: string; + weapons: readonly string[]; +}[] = [ + { + name: "Shooters", + weapons: [ + "Sploosh-o-matic", + "Neo Sploosh-o-matic", + "Sploosh-o-matic 7", + "Splattershot Jr.", + "Custom Splattershot Jr.", + "Kensa Splattershot Jr.", + "Splash-o-matic", + "Neo Splash-o-matic", + "Aerospray MG", + "Aerospray RG", + "Aerospray PG", + "Splattershot", + "Hero Shot Replica", + "Tentatek Splattershot", + "Octo Shot Replica", + "Kensa Splattershot", + ".52 Gal", + ".52 Gal Deco", + "Kensa .52 Gal", + "N-ZAP '85", + "N-ZAP '89", + "N-ZAP '83", + "Splattershot Pro", + "Forge Splattershot Pro", + "Kensa Splattershot Pro", + ".96 Gal", + ".96 Gal Deco", + "Jet Squelcher", + "Custom Jet Squelcher", + "L-3 Nozzlenose", + "L-3 Nozzlenose D", + "Kensa L-3 Nozzlenose", + "H-3 Nozzlenose", + "H-3 Nozzlenose D", + "Cherry H-3 Nozzlenose", + "Squeezer", + "Foil Squeezer", + ], + }, + { + name: "Blasters", + weapons: [ + "Luna Blaster", + "Luna Blaster Neo", + "Kensa Luna Blaster", + "Blaster", + "Hero Blaster Replica", + "Custom Blaster", + "Range Blaster", + "Custom Range Blaster", + "Grim Range Blaster", + "Rapid Blaster", + "Rapid Blaster Deco", + "Kensa Rapid Blaster", + "Rapid Blaster Pro", + "Rapid Blaster Pro Deco", + "Clash Blaster", + "Clash Blaster Neo", + ], + }, + { + name: "Rollers", + weapons: [ + "Carbon Roller", + "Carbon Roller Deco", + "Splat Roller", + "Hero Roller Replica", + "Krak-On Splat Roller", + "Kensa Splat Roller", + "Dynamo Roller", + "Gold Dynamo Roller", + "Kensa Dynamo Roller", + "Flingza Roller", + "Foil Flingza Roller", + ], + }, + { + name: "Brushes", + weapons: [ + "Inkbrush", + "Inkbrush Nouveau", + "Permanent Inkbrush", + "Octobrush", + "Herobrush Replica", + "Octobrush Nouveau", + "Kensa Octobrush", + ], + }, + { + name: "Chargers", + weapons: [ + "Classic Squiffer", + "New Squiffer", + "Fresh Squiffer", + "Splat Charger", + "Hero Charger Replica", + "Firefin Splat Charger", + "Kensa Charger", + "Splatterscope", + "Firefin Splatterscope", + "Kensa Splatterscope", + "E-liter 4K", + "Custom E-liter 4K", + "E-liter 4K Scope", + "Custom E-liter 4K Scope", + "Bamboozler 14 Mk I", + "Bamboozler 14 Mk II", + "Bamboozler 14 Mk III", + "Goo Tuber", + "Custom Goo Tuber", + ], + }, + { + name: "Sloshers", + weapons: [ + "Slosher", + "Hero Slosher Replica", + "Slosher Deco", + "Soda Slosher", + "Tri-Slosher", + "Tri-Slosher Nouveau", + "Sloshing Machine", + "Sloshing Machine Neo", + "Kensa Sloshing Machine", + "Bloblobber", + "Bloblobber Deco", + "Explosher", + "Custom Explosher", + ], + }, + { + name: "Splatlings", + weapons: [ + "Mini Splatling", + "Zink Mini Splatling", + "Kensa Mini Splatling", + "Heavy Splatling", + "Hero Splatling Replica", + "Heavy Splatling Deco", + "Heavy Splatling Remix", + "Hydra Splatling", + "Custom Hydra Splatling", + "Ballpoint Splatling", + "Ballpoint Splatling Nouveau", + "Nautilus 47", + "Nautilus 79", + ], + }, + { + name: "Dualies", + weapons: [ + "Dapple Dualies", + "Dapple Dualies Nouveau", + "Clear Dapple Dualies", + "Splat Dualies", + "Hero Dualie Replicas", + "Enperry Splat Dualies", + "Kensa Splat Dualies", + "Glooga Dualies", + "Glooga Dualies Deco", + "Kensa Glooga Dualies", + "Dualie Squelchers", + "Custom Dualie Squelchers", + "Dark Tetra Dualies", + "Light Tetra Dualies", + ], + }, + { + name: "Brellas", + weapons: [ + "Splat Brella", + "Hero Brella Replica", + "Sorella Brella", + "Tenta Brella", + "Tenta Sorella Brella", + "Tenta Camo Brella", + "Undercover Brella", + "Undercover Sorella Brella", + "Kensa Undercover Brella", + ], + }, +] as const; diff --git a/pages/u/[identifier].tsx b/pages/u/[identifier].tsx index b8a193c2b..80400781b 100644 --- a/pages/u/[identifier].tsx +++ b/pages/u/[identifier].tsx @@ -10,6 +10,7 @@ import Profile from "scenes/Profile"; const prisma = new PrismaClient(); +// FIXME: should try to make it so that /u/Sendou and /u/234234298348 point to the same page export const getStaticPaths: GetStaticPaths = async () => { const users = await prisma.user.findMany({}); return {