feat: applied new renderer to ownedtanks

This commit is contained in:
TresAbhi committed 2023-06-05 18:47:00 +00:00
1 parent 58c68968e7
commit 9e97c4a5ec
7 files changed
+140 -44

No files matched your search

+21 -9
View File
@@ -1,6 +1,8 @@
import { StaticPool } from 'node-worker-threads-pool';
import { WargamingResponse } from '../../types/wargamingResponse.js';
export type TankType = 'AT-SPG' | 'lightTank' | 'mediumTank' | 'heavyTank';
export interface TankopediaEntry {
name: string;
nation: string;
@@ -9,7 +11,7 @@ export interface TankopediaEntry {
cost: { price_credit: number; price_gold: number };
images: { preview: string; normal: string };
tank_id: number;
type: string;
type: TankType;
description: string;
}
@@ -25,14 +27,24 @@ export const tankopedia = (
).data;
console.log('Cached tankopedia');
/**
* @deprecated
*/
export const TANK_TYPE_EMOJIS: Record<string, string> = {
'AT-SPG': '🔽',
heavyTank: '🇭',
mediumTank: '🇲',
lightTank: '🇱',
export const TANK_ICONS: Record<TankType, string> = {
'AT-SPG': 'https://i.imgur.com/BIHSEH0.png',
lightTank: 'https://i.imgur.com/CSNha5V.png',
mediumTank: 'https://i.imgur.com/wvf3ltm.png',
heavyTank: 'https://i.imgur.com/ECeqlZa.png',
};
export const TIER_ROMAN_NUMERALS: Record<number, string> = {
1: 'I',
2: 'II',
3: 'III',
4: 'IV',
5: 'V',
6: 'VI',
7: 'VII',
8: 'VIII',
9: 'IX',
10: 'X',
};
export const TANK_IDS = Object.keys(tankopedia).map((id) => Number(id));