From 58002958bf4357d5949d1fb14dc89073420f9fdb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com>
Date: Mon, 19 Feb 2024 19:05:49 -0600
Subject: [PATCH] feat: move ammo types to fire
---
.../Characteristics/components/Modules.tsx | 27 +---------------
.../[id]/components/Characteristics/index.tsx | 32 +++++++++++++++++--
2 files changed, 30 insertions(+), 29 deletions(-)
diff --git a/src/app/tools/tankopedia/[id]/components/Characteristics/components/Modules.tsx b/src/app/tools/tankopedia/[id]/components/Characteristics/components/Modules.tsx
index 527990f61..3b8b01453 100644
--- a/src/app/tools/tankopedia/[id]/components/Characteristics/components/Modules.tsx
+++ b/src/app/tools/tankopedia/[id]/components/Characteristics/components/Modules.tsx
@@ -1,10 +1,6 @@
import { Flex, Heading } from '@radix-ui/themes';
import { ModuleButton } from '../../../../../../../components/ModuleButtons/ModuleButton';
-import { ShellButton } from '../../../../../../../components/ModuleButtons/ShellButton';
-import {
- SHELL_NAMES,
- TIER_ROMAN_NUMERALS,
-} from '../../../../../../../core/blitzkrieg/tankDefinitions';
+import { TIER_ROMAN_NUMERALS } from '../../../../../../../core/blitzkrieg/tankDefinitions';
import { mutateDuel, useDuel } from '../../../../../../../stores/duel';
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
@@ -102,27 +98,6 @@ export function Modules() {
);
})}
-
-
- {protagonist.gun.shells.map((shell, index) => {
- return (
- {
- mutateDuel((draft) => {
- draft.protagonist!.shell = shell;
- });
- }}
- />
- );
- })}
-
);
diff --git a/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx b/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx
index b7be9a102..b2852e01a 100644
--- a/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx
+++ b/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx
@@ -3,6 +3,7 @@ import { Flex, Heading, Slider, Text, TextField } from '@radix-ui/themes';
import { debounce } from 'lodash';
import { use, useEffect, useRef, useState } from 'react';
import { lerp } from 'three/src/math/MathUtils';
+import { ShellButton } from '../../../../../../components/ModuleButtons/ShellButton';
import { isExplosive } from '../../../../../../core/blitz/isExplosive';
import { resolveNearPenetration } from '../../../../../../core/blitz/resolveNearPenetration';
import { coefficient } from '../../../../../../core/blitzkrieg/coefficient';
@@ -15,13 +16,14 @@ import { sum } from '../../../../../../core/blitzkrieg/sum';
import {
CREW_MEMBER_NAMES,
GUN_TYPE_NAMES,
+ SHELL_NAMES,
} from '../../../../../../core/blitzkrieg/tankDefinitions';
import { unionBoundingBox } from '../../../../../../core/blitzkrieg/unionBoundingBox';
import { useConsumable } from '../../../../../../hooks/useConsumable';
import { useEquipment } from '../../../../../../hooks/useEquipment';
import { useProvision } from '../../../../../../hooks/useProvision';
import { useProvisions } from '../../../../../../hooks/useProvisions';
-import { useDuel } from '../../../../../../stores/duel';
+import { mutateDuel, useDuel } from '../../../../../../stores/duel';
import { useTankopediaTemporary } from '../../../../../../stores/tankopedia';
import { Info } from './components/Info';
import { InfoWithDelta } from './components/InfoWithDelta';
@@ -230,9 +232,33 @@ export function Characteristics() {
}, [penetrationDistance]);
return (
-
+
- Fire
+
+ Fire
+
+
+ {gun.shells.map((thisShell, index) => {
+ return (
+ {
+ mutateDuel((draft) => {
+ draft.protagonist!.shell = thisShell;
+ });
+ }}
+ />
+ );
+ })}
+
+
+
{GUN_TYPE_NAMES[gun.type]}
{dpm}