mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
feat: use short tank name
This commit is contained in:
1 parent
bdc7132337
commit
67e45ada85
3 files changed
+9
-9
No files matched your search
@@ -1,6 +1,8 @@
|
||||
import { tankopedia } from '../blitzkrieg/tankopedia';
|
||||
|
||||
export default async function resolveTankName(tankId: number) {
|
||||
const tankopediaName = (await tankopedia)[tankId]?.name;
|
||||
return tankopediaName ? tankopediaName : `Unknown Tank ${tankId}`;
|
||||
const awaitedTankopedia = await tankopedia;
|
||||
const entry = awaitedTankopedia[tankId];
|
||||
|
||||
return entry?.name_short ?? entry?.name ?? `Unknown Tank ${tankId}`;
|
||||
}
|
||||
Reference in new issue
Block a user