From 7bde92c7f1026766fe4ae5664a83e4f94d647390 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com>
Date: Mon, 4 Dec 2023 18:48:52 -0600
Subject: [PATCH] feat: update to new asset format
---
scripts/buildTankopedia.ts | 4 ++--
src/app/tools/tankopedia/page.tsx | 4 ++--
src/components/Tanks/components/Item.tsx | 6 +++---
src/core/discord/addFilterOptions.ts | 4 ++--
src/core/statistics/filterStats.ts | 4 ++--
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/scripts/buildTankopedia.ts b/scripts/buildTankopedia.ts
index 93680c356..de83e9638 100644
--- a/scripts/buildTankopedia.ts
+++ b/scripts/buildTankopedia.ts
@@ -103,7 +103,7 @@ Promise.all(
? 'collector'
: isPremium
? 'premium'
- : 'tech-tree',
+ : 'researchable',
tier,
type,
};
@@ -182,7 +182,7 @@ Promise.all(
return {
content,
encoding: 'base64',
- path: `flags/${name}.webp`,
+ path: `flags/scratched/${name}.webp`,
} satisfies FileChange;
}),
),
diff --git a/src/app/tools/tankopedia/page.tsx b/src/app/tools/tankopedia/page.tsx
index 6f34d505e..6c3c01a4f 100644
--- a/src/app/tools/tankopedia/page.tsx
+++ b/src/app/tools/tankopedia/page.tsx
@@ -142,7 +142,7 @@ export default function Page() {
{tank.nation !== 'other' && (
= {
- 'tech-tree': 'Tech tree',
+ researchable: 'Tech tree',
premium: 'Premium',
collector: 'Collector',
};
export const TREE_TYPE_IMAGES: Record = {
- 'tech-tree': 'https://i.imgur.com/pJxO2XY.png',
+ researchable: 'https://i.imgur.com/pJxO2XY.png',
premium: 'https://i.imgur.com/mZzSwOU.png',
collector: 'https://i.imgur.com/7A0RsG5.png',
};
diff --git a/src/core/discord/addFilterOptions.ts b/src/core/discord/addFilterOptions.ts
index 9468e0484..94d8eef42 100644
--- a/src/core/discord/addFilterOptions.ts
+++ b/src/core/discord/addFilterOptions.ts
@@ -55,8 +55,8 @@ export default async function addFilterOptions<
.setDescription('Tech tree type')
.addChoices(
{
- name: TREE_TYPE_NAMES['tech-tree'],
- value: 'tech-tree' satisfies TreeTypeString,
+ name: TREE_TYPE_NAMES['researchable'],
+ value: 'researchable' satisfies TreeTypeString,
},
{
name: TREE_TYPE_NAMES.premium,
diff --git a/src/core/statistics/filterStats.ts b/src/core/statistics/filterStats.ts
index 172aa6ed9..e371bca55 100644
--- a/src/core/statistics/filterStats.ts
+++ b/src/core/statistics/filterStats.ts
@@ -33,8 +33,8 @@ export async function filterStats(
(filters.treeType === undefined ||
(filters.treeType === 'collector' && entry.tree_type === 'collector') ||
(filters.treeType === 'premium' && entry.tree_type === 'premium') ||
- (filters.treeType === 'tech-tree' &&
- entry.tree_type === 'tech-tree')) &&
+ (filters.treeType === 'researchable' &&
+ entry.tree_type === 'researchable')) &&
(filters.tank === undefined || entry.id === filters.tank)
);
});