mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: tank icon api
This commit is contained in:
1 parent
6fec467ec8
commit
0ebf9f6c3d
3 files changed
+18
-1
No files matched your search
@@ -0,0 +1,5 @@
|
||||
import { GameInterface } from "@blitzkit/game";
|
||||
|
||||
export const game = new GameInterface(
|
||||
"C:/Program Files (x86)/Steam/steamapps/common/World of Tanks Blitz Playtest",
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { APIContext } from "astro";
|
||||
import { api } from "../../../core/api/dynamic";
|
||||
import { game } from "../../../core/game/game";
|
||||
|
||||
export { getStaticPaths } from "./[id].pb";
|
||||
|
||||
export async function GET({ params }: APIContext<never, { id: string }>) {
|
||||
const tank = await api.tank(params.id);
|
||||
const image = game.tankBigIcon(params.id, tank.tank!.visual_data);
|
||||
return new Response(new Uint8Array(image));
|
||||
}
|
||||
@@ -9,5 +9,6 @@ message Tank {
|
||||
blitz_static_tank_component.TankCatalogComponent tank = 1;
|
||||
blitz_static_compensation_component.CompensationComponent compensation = 2;
|
||||
|
||||
string slug = 3;
|
||||
string id = 3;
|
||||
string slug = 4;
|
||||
}
|
||||
Reference in new issue
Block a user