feat: custom tank icons

This commit is contained in:
tresabhi committed 2024-12-16 12:41:24 -06:00
1 parent 2ad0fcfdf9
commit 4848234264
8 files changed
+36 -97

No files matched your search

@@ -1,4 +1,4 @@
import { asset, tankIcon, TankType, type TankDefinition } from '@blitzkit/core';
import { asset, TankType, type TankDefinition } from '@blitzkit/core';
import { Flex, Link, Text, type TextProps } from '@radix-ui/themes';
import { uniq } from 'lodash-es';
import { forwardRef, type ReactNode } from 'react';
@@ -70,7 +70,7 @@ export const TankCard = forwardRef<HTMLSpanElement, TankCardProps>(
>
<img
alt={tank.name}
src={tankIcon(tank.id)}
src={asset(`icons/tanks/blitzkit/${tank.id}.webp`)}
className="image"
draggable={false}
/>
@@ -1,7 +1,6 @@
import * as lodash from 'lodash-es';
import { create } from 'zustand';
import { persist, subscribeWithSelector } from 'zustand/middleware';
import { ENVIRONMENTS } from '../../constants/lightingEnvironments';
import { createContextualStore } from '../../core/zustand/createContextualStore';
import { SORT_NAMES } from './constants';
@@ -13,10 +12,8 @@ export interface TankopediaPersistentStore {
wireframe: boolean;
opaque: boolean;
advancedHighlighting: boolean;
environment: (typeof ENVIRONMENTS)[number];
showGrid: boolean;
greenPenetration: boolean;
showEnvironment: boolean;
showSpacedArmor: boolean;
showExternalModules: boolean;
showPrimaryArmor: boolean;
@@ -35,10 +32,8 @@ export const TankopediaPersistent = createContextualStore(() =>
wireframe: false,
opaque: false,
advancedHighlighting: false,
environment: ENVIRONMENTS[0],
showGrid: true,
greenPenetration: false,
showEnvironment: false,
showSpacedArmor: true,
showExternalModules: true,
showPrimaryArmor: true,