fix: remove shot after module change

This commit is contained in:
TrèsAbhi committed 2024-02-22 17:49:05 -06:00
1 parent 291b93b7d7
commit 26ae7bcbdf
2 files changed
+7

No files matched your search

@@ -150,6 +150,9 @@ export function AntagonistBar() {
draft.antagonist!.shell =
draft.antagonist!.gun.shells[0];
});
mutateTankopediaTemporary((draft) => {
draft.shot = undefined;
});
}}
selected={antagonist.turret.id === turret.id}
discriminator={
@@ -2,6 +2,7 @@ import { Flex, Heading } from '@radix-ui/themes';
import { ModuleButton } from '../../../../../../../components/ModuleButtons/ModuleButton';
import { TIER_ROMAN_NUMERALS } from '../../../../../../../core/blitzkrieg/tankDefinitions';
import { mutateDuel, useDuel } from '../../../../../../../stores/duel';
import { mutateTankopediaTemporary } from '../../../../../../../stores/tankopedia';
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
export function Modules() {
@@ -29,6 +30,9 @@ export function Modules() {
draft.protagonist!.gun = turret.guns.at(-1)!;
draft.protagonist!.shell = turret.guns.at(-1)!.shells[0];
});
mutateTankopediaTemporary((draft) => {
draft.shot = undefined;
});
}}
/>
);