diff --git a/packages/website-ue/src/pages/[...locale]/tanks/[slug]/_index.tsx b/packages/website-ue/src/pages/[...locale]/tanks/[slug]/_index.tsx index b6fea4a69..a83cfbc44 100644 --- a/packages/website-ue/src/pages/[...locale]/tanks/[slug]/_index.tsx +++ b/packages/website-ue/src/pages/[...locale]/tanks/[slug]/_index.tsx @@ -1,9 +1,10 @@ import { Grade } from "@blitzkit/closed/protos/game/proto/legacy/blitz_static_standard_grades_enum"; +import { PenetrationGroup_CommonData } from "@blitzkit/closed/protos/game/proto/legacy/blitz_static_tank_penetration_group"; import { + PenetrationGroupUpgrade_TankPart, StageParameters_StageType, TankAttributeChange_AttributeName, } from "@blitzkit/closed/protos/game/proto/legacy/blitz_static_tank_upgrade_single_stage"; -import { Suspense } from "react"; import { api } from "../../../../core/api/dynamic"; import { aggregateParameters } from "../../../../core/tankopedia/aggregateParameters"; import { useAwait } from "../../../../hooks/useAwait"; @@ -26,12 +27,6 @@ export function Page({ id, locale }: PageProps) { ); - - return ( - - - - ); } function Content() { @@ -165,230 +160,32 @@ function Content() { ); })} + +

penetration groups

+ + {parameters.penetration_groups_upgrades.map((upgrade) => { + return ( + <> +

{PenetrationGroupUpgrade_TankPart[upgrade.tank_part]}

+ + + primary armor ({upgrade.primary_armor.length}):{" "} + {upgrade.primary_armor} + + +
+ + {upgrade.penetration_groups.map((group) => { + return ( + + {group.group_name}: {group.armor} ( + {PenetrationGroup_CommonData[group.common_data]}) + + ); + })} + + ); + })} ); - - // const compare = Tankopedia.use((state) => state.compare); - // const characteristics = useMemo( - // () => computeCharacteristics(id, tank, protagonist), - // [protagonist], - // ); - // // const otherCharacteristics = useMemo( - // // () => - // // tankList.list - // // .filter((tank) => tank.id !== id) - // // .map(({ id }) => { - // // const state = { ...protagonist }; - // // const tank = otherTanks.tanks[id]; - - // // return computeCharacteristics( - // // id, - // // tank.tank!, - // // tank.compensation!, - // // state - // // ); - // // }), - // // [protagonist] - // // ); - - // return ( - // <> - //

{id}

- - //
- // {tank.tank?.feature_screens?.tags.map((tag) => ( - // {tag.value} - // ))} - //
- - //
- - //
- // {times(tank.tank!.upgrade_stages.length + 1, (index) => ( - // - // ))} - //
- - //
- - //
- // {characteristics.parameters.shells_upgrades.map((shell) => ( - // - // ))} - //
- - //
- - //
- // speed (0 - {characteristics.characteristics.speed_forward}) - // { - // Tankopedia.mutate((draft) => { - // draft.protagonist.speed = event.target.valueAsNumber; - // }); - // }} - // /> - //
- - //
- - //
- // isHullTraversing - // { - // Tankopedia.mutate((draft) => { - // draft.protagonist.isHullTraversing = event.target.checked; - // }); - // }} - // /> - //
- - //
- - //
- // isTurretTraversing - // { - // Tankopedia.mutate((draft) => { - // draft.protagonist.isTurretTraversing = event.target.checked; - // }); - // }} - // /> - //
- - //
- - //
- // isShooting - // { - // Tankopedia.mutate((draft) => { - // draft.protagonist.isShooting = event.target.checked; - // }); - // }} - // /> - //
- - //
- - //
- // isGunDamaged - // { - // Tankopedia.mutate((draft) => { - // draft.protagonist.isGunDamaged = event.target.checked; - // }); - // }} - // /> - //
- - //
- - //
- // {Object.values(TerrainHardness).map( - // (hardness) => - // typeof hardness === "number" && ( - // - // ), - // )} - //
- - //
- - //
- // isCaughtOnFire - // { - // Tankopedia.mutate((draft) => { - // draft.protagonist.isCaughtOnFire = event.target.checked; - // }); - // }} - // /> - //
- - //
- - //
- // {Object.values(TankopediaCompare).map( - // (c) => - // typeof c === "number" && ( - // - // ), - // )} - //
- - //
- - // {characteristicsOrder.map(({ group, order }) => ( - // <> - //

{group}

- - // {order.map((config) => - // "toy" in config ? ( - // - // ) : ( - // - // ), - // )} - // - // ))} - // - // ); }