diff --git a/src/app/tools/tankopedia/[id]/page.tsx b/src/app/tools/tankopedia/[id]/page.tsx index 653a39875..eda2de3c6 100644 --- a/src/app/tools/tankopedia/[id]/page.tsx +++ b/src/app/tools/tankopedia/[id]/page.tsx @@ -1,12 +1,32 @@ 'use client'; -import { Button, Flex, Heading } from '@radix-ui/themes'; +import { ArrowLeftIcon } from '@radix-ui/react-icons'; +import { + AspectRatio, + Button, + Card, + Checkbox, + Flex, + Heading, + Inset, + Select, + Slider, + Text, + Theme, + Tooltip, +} from '@radix-ui/themes'; +import { OrbitControls } from '@react-three/drei'; +import { Canvas } from '@react-three/fiber'; +import Link from 'next/link'; import { use, useEffect, useState } from 'react'; import { Flag } from '../../../../components/Flag'; import PageWrapper from '../../../../components/PageWrapper'; import { gunDefinitions } from '../../../../core/blitzkrieg/definitions/guns'; import { shellDefinitions } from '../../../../core/blitzkrieg/definitions/shells'; -import { tankDefinitions } from '../../../../core/blitzkrieg/definitions/tanks'; +import { + TIER_ROMAN_NUMERALS, + tankDefinitions, +} from '../../../../core/blitzkrieg/definitions/tanks'; import { turretDefinitions } from '../../../../core/blitzkrieg/definitions/turrets'; const SIZE = 0.05; @@ -22,55 +42,188 @@ export default function Page({ params }: { params: { id: string } }) { awaitedTurretDefinitions[tank.turrets[0]], ); const [gun, setGun] = useState(awaitedGunDefinitions[turret.guns[0]]); - const [shell, setShell] = useState(awaitedShellDefinitions[gun.shells[0]]); + const [crew, setCrew] = useState(100); useEffect(() => setGun(awaitedGunDefinitions[turret.guns[0]]), [turret]); - useEffect(() => setShell(awaitedShellDefinitions[gun.shells[0]]), [gun]); return ( - - - {tank.name} - + + + + + + + Back to tankopedia + + - - Turrets + + {tank.name} + + + - {tank.turrets.map((turretId) => ( - - ))} - + + + + event.preventDefault()}> + - - Guns + + - {turret.guns.map((gunId) => ( - - ))} - + + + + + + - - Shells + + + Enhanced armor + + + - {gun.shells.map((shellId) => ( - - ))} + + + + Versus + + + + + + XM66F + + + + + + + Calibrated shells + + + + + + + + + + + + + Build + + + + Modules + + + + + {tank.turrets.map((turretId) => { + const thisTurret = awaitedTurretDefinitions[turretId]; + + return ( + + + + ); + })} + + + + {turret.guns.map((gunId, index) => { + const thisGun = awaitedGunDefinitions[gunId]; + + return ( + + + + ); + })} + + + + + + + + Crew + + + + {crew}% + + setCrew(crew)} + /> + + + + + + Shells + + {gun.shells.map((shellId) => { + const shell = awaitedShellDefinitions[shellId]; + + return ( + + {shell.name} ({shell.type}): {shell.damage.armor} + + ); + })} + ); diff --git a/src/core/blitzkrieg/definitions/guns.ts b/src/core/blitzkrieg/definitions/guns.ts index f540645b7..4de669219 100644 --- a/src/core/blitzkrieg/definitions/guns.ts +++ b/src/core/blitzkrieg/definitions/guns.ts @@ -1,9 +1,10 @@ import { asset } from '../asset'; +import { Tier } from './tanks'; export interface BlitzkriegGunDefinition { id: number; name: string; - tier: number; + tier: Tier; pitch: [number, number]; shells: number[]; } diff --git a/src/core/blitzkrieg/definitions/turrets.ts b/src/core/blitzkrieg/definitions/turrets.ts index a1871850c..7399a09c3 100644 --- a/src/core/blitzkrieg/definitions/turrets.ts +++ b/src/core/blitzkrieg/definitions/turrets.ts @@ -1,9 +1,10 @@ import { asset } from '../asset'; +import { Tier } from './tanks'; export interface BlitzkriegTurretDefinition { id: number; name: string; - tier: number; + tier: Tier; yaw: [number, number]; guns: number[]; }