From 2f48dbc25c933dac75a9dad8c470917d165c9797 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com>
Date: Sun, 21 Apr 2024 17:39:24 -0500
Subject: [PATCH] feat: more shell properties
---
docs/changelogs/1.19.5.md | 1 +
src/app/tools/compare/page.tsx | 13 +++++++++++-
.../[id]/components/Characteristics/index.tsx | 21 ++++++++++++++-----
src/core/blitzkrieg/tankCharacteristics.ts | 4 ++++
4 files changed, 33 insertions(+), 6 deletions(-)
diff --git a/docs/changelogs/1.19.5.md b/docs/changelogs/1.19.5.md
index 6a87872d9..49b504dd4 100644
--- a/docs/changelogs/1.19.5.md
+++ b/docs/changelogs/1.19.5.md
@@ -6,6 +6,7 @@ The tankopedia, now more helpful than ever!
- The Tankopedia pages for tanks now include videos from YouTubers
- The selection of tanks that have videos is very small currently but you can help expand it by dropping suggestions on [the official Discord server](https://discord.gg/nDt7AjGJQH)
+- Added shell normalization and ricochet angles to the Tankopedia and Compare
## Fixes
diff --git a/src/app/tools/compare/page.tsx b/src/app/tools/compare/page.tsx
index 0806db507..b5bbd191c 100644
--- a/src/app/tools/compare/page.tsx
+++ b/src/app/tools/compare/page.tsx
@@ -1233,10 +1233,21 @@ export default function Page() {
>
)}
-
+
+
+
-
{GUN_TYPE_NAMES[gun.type]}
{stats.dpm}
@@ -189,7 +188,6 @@ export function Characteristics() {
{gun.type !== 'regular' && (
{stats.shells}
)}
-
{gun.type === 'autoReloader' ? (
<>
@@ -229,9 +227,6 @@ export function Characteristics() {
{stats.intraClip!}
)}
-
- {stats.caliber}
-
{stats.penetration}
@@ -295,6 +290,22 @@ export function Characteristics() {
{stats.explosionRadius!}
)}
+
+ {stats.caliber}
+
+
+ {stats.shellNormalization}
+
+ {shell.type !== 'he' && (
+
+ {stats.shellRicochet!}
+
+ )}
{stats.shellVelocity}
diff --git a/src/core/blitzkrieg/tankCharacteristics.ts b/src/core/blitzkrieg/tankCharacteristics.ts
index 63681ddab..053624088 100644
--- a/src/core/blitzkrieg/tankCharacteristics.ts
+++ b/src/core/blitzkrieg/tankCharacteristics.ts
@@ -430,8 +430,12 @@ export function tankCharacteristics(
const height = size[0];
const length = size[1];
const volume = width * height * length;
+ const shellNormalization = shell.normalization ?? 0;
+ const shellRicochet = shell.ricochet;
return {
+ shellNormalization,
+ shellRicochet,
dpm,
dpmMaximum,
dpmEffective,