mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-17 10:53:57 +01:00
feat: tier sorting
This commit is contained in:
1 parent
b4936bf13b
commit
385cc3b6d2
8 files changed
+64
-7
No files matched your search
@@ -8,6 +8,7 @@ import type { PopularTanks } from "@protos/blitzkit/popular_tanks";
|
||||
import type { Tank } from "@protos/blitzkit/tank";
|
||||
import type { TankListEntry } from "@protos/blitzkit/tank_list";
|
||||
import type { Tanks } from "@protos/blitzkit/tanks";
|
||||
import type { Tiers } from "@protos/blitzkit/tiers";
|
||||
import type { RemoteStorageComponent } from "@protos/game/proto/legacy/blitz_static_remote_storage_component";
|
||||
import { existsSync } from "fs";
|
||||
import { mkdir, readFile, writeFile } from "fs/promises";
|
||||
@@ -173,6 +174,18 @@ export class ServerAPI extends AbstractAPI {
|
||||
return JSON.parse(data) as PopularTanks;
|
||||
}
|
||||
|
||||
@Cache()
|
||||
async tiers() {
|
||||
const group = this.metadata.group("TankTierEntity");
|
||||
const tiers: Tiers = { tiers: {} };
|
||||
|
||||
for (const item of group) {
|
||||
tiers.tiers[item.name] = item.TankTier();
|
||||
}
|
||||
|
||||
return tiers;
|
||||
}
|
||||
|
||||
@Cache()
|
||||
async strings(locale: string) {
|
||||
const localized = (await globbedStrings[
|
||||
|
||||
Reference in new issue
Block a user