From b81d9985ee4ede1ece9fa1d64460811ac5b5e385 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Tue, 19 May 2026 13:43:43 -0500 Subject: [PATCH] alts and batch alignemnt --- .../TankopediaLoadout/index.module.css | 73 ++++++++++--------- .../components/TankopediaLoadout/index.tsx | 11 ++- .../src/tankopedia/aggregateParameters.ts | 49 +------------ .../src/tankopedia/characteristics.ts | 4 +- .../src/tankopedia/computeCharacteristics.ts | 43 +++++++++-- 5 files changed, 85 insertions(+), 95 deletions(-) diff --git a/packages/website-ue/src/components/TankopediaLoadout/index.module.css b/packages/website-ue/src/components/TankopediaLoadout/index.module.css index 9276c3158..86630a9f7 100644 --- a/packages/website-ue/src/components/TankopediaLoadout/index.module.css +++ b/packages/website-ue/src/components/TankopediaLoadout/index.module.css @@ -60,56 +60,61 @@ .line { display: flex; - flex-direction: column; gap: var(--space-3); - .line-wrap { + .chunks-wrapper { display: flex; - align-items: center; - + flex-direction: column; gap: var(--space-3); - .wrap-marker { - padding-bottom: var(--font-size-minor); - - svg { - width: 1em; - height: 1em; - } - } - - .wrapper { + .line-wrap { display: flex; - flex-direction: column; align-items: center; - gap: var(--space-2); - .stage { - position: relative; + gap: var(--space-3); - padding: var(--space-3); + .wrap-marker { + padding-bottom: var(--font-size-minor); - font-size: 2em; - - .icon { + svg { width: 1em; height: 1em; - - transform: translate(var(--space-1), var(--space-1)); } + } - .tier { - position: absolute; - left: var(--space-2); - top: var(--space-2); - } + .wrapper { + display: flex; + flex-direction: column; + align-items: center; + gap: var(--space-2); - .price { - position: absolute; - left: 50%; - bottom: var(--space-2); - transform: translateX(-50%); + .stage { + position: relative; + + padding: var(--space-3); + + font-size: 2em; + + .icon { + width: 1em; + height: 1em; + + transform: translate(var(--space-1), var(--space-1)); + } + + .tier { + position: absolute; + left: var(--space-2); + top: var(--space-2); + } + + .price { + position: absolute; + left: 50%; + bottom: var(--space-2); + transform: translateX(-50%); + } } } } diff --git a/packages/website-ue/src/components/TankopediaLoadout/index.tsx b/packages/website-ue/src/components/TankopediaLoadout/index.tsx index adfbe6543..b1cc21a1e 100644 --- a/packages/website-ue/src/components/TankopediaLoadout/index.tsx +++ b/packages/website-ue/src/components/TankopediaLoadout/index.tsx @@ -130,16 +130,11 @@ function EquipmentOption({ }: EquipmentOptionProps) { const equipmentIndex = rowIndex * equipmentColumns + columnIndex; - const tank = useProtagonist(); - const equipment = useEquipment(tank.tank!); const isSelected = Tankopedia.use( (state) => equipmentIndex in state.protagonist.equipment && state.protagonist.equipment[equipmentIndex] === optionIndex, ); - const name = - equipment.preset.slots[equipmentIndex].options_catalog_i_ds[optionIndex]; - const equipmentData = equipment.equipments[name]; return (